What you will be able to do
- Distinguish a performance improvement from an architectural scale - and say why only one raises the ceiling.
- Order the scaling ladder correctly: tune, scale up, read scale-out, partition, shard.
- Explain why high availability is not read scaling, and when a readable replica is and is not the answer.
- Describe sharding's real cost - cross-shard queries, distributed transactions, the application-owned shard map.
- Predict where the bottleneck migrates after each fix - the ceiling the next rung hits.
Concepts covered
SQL Server has one writer. That is the fact every scaling decision hangs on, and it makes the scaling menu a ladder, not a topology: each rung raises a different ceiling and none of them makes writes distributed. First, the distinction this lesson is built on.
The analogy is a restaurant that can no longer serve its covers. Training the chefs and rewriting the recipes is tuning - each dish leaves the kitchen faster, but the kitchen itself is the same size. Moving to bigger premises is scale-up - a real ceiling-raiser, until there is no bigger kitchen to rent. A counter serving pre-made dishes is read scale-out - it takes the queue for the ready items off the kitchen, but every freshly cooked order still lands on the one kitchen. Opening branches is sharding - the only move that multiplies the number of kitchens, and the one that changes how the whole business is run.
Performance improvement is not scaling
A faster query, a better index, a fixed latch convoy - these are performance improvements: they lower the cost of each unit of work on the same box. Scaling raises the capacity ceiling - the point past which the system cannot go at any efficiency. Both matter, and confusing them is how a tuned system still hits the wall: tuning makes the ceiling comfortable, scaling moves it. You tune until tuning stops paying; then you scale, in this order:
The ladder
The scaling ladder - each rung raises a different ceiling
Tune
Indexes, plans, batching, concurrency - the per-unit cost falls
Not scaling: the ceiling is unchanged, only the cost under it
Scale up
Bigger instance - more cores, memory, faster storage
The first real ceiling-raiser, bounded by the top instance class
Read scale-out
Readable replicas serve reads
Raises the read ceiling only - writes still hit one engine
Partition / shard
Data split across files or across databases
Sharding is the only write scale-out - and it changes the application
The rungs in detail
Scale-up and its limits
The honest first move, and it always ends: one box has a maximum. On a managed platform the ceiling is the top instance class; on EC2 it is the top shape storage can keep up with. Scale-up is correct until the workload’s binding resource exceeds what any instance class offers - at which point vertical scaling is exhausted, not merely expensive.
Connection management and concurrency
Concurrency is a resource before it is a feature. A connection pool that opens a thousand
connections creates a thousand schedulable requests fighting for schedulers - so bounding the pool
is capacity management, not lost parallelism. max worker threads is the engine-side ceiling; the
pool and it should be set against each other, not independently.
The log and storage ceilings
Writes are bounded by the log flush and the data-path IOPS - the two storage ceilings that decide write throughput before the CPU ever matters. On cloud these are provisioned numbers, which means a workload can hit a ceiling the hardware is not imposing: on RDS, provisioned IOPS is a purchased limit, not a physical one, and it is the first thing to check when write throughput plateaus.
Partitioning and retention
Table partitioning is an administration feature, not a scaling one - it splits a logical table into physical partitions so a sliding window can be switched out as metadata rather than deleted row-by-row. It does not spread write load across hardware; it makes retention cheap and enables partition-level lock escalation.
High availability is not read scaling
Always On availability groups exist for durability and failover - a synchronous secondary buys the commit’s guarantee by adding its acknowledgement to the commit path. The secondary can serve reads, but that is a side-benefit, not its purpose, and it carries a cost: synchronous replication adds latency to every commit. Calling HA “read scaling” confuses two objectives; a read replica (async, readable, no failover role) is the actual read-scale tool, and it serves stale reads by definition - a fit for reporting, not for read-your-writes. Patching and major-version upgrades across replicas and AGs is its own discipline - see SQL Server upgrades.
Sharding - the only write scale-out
Splitting data across many independent databases is the only way writes scale horizontally - and it is the most expensive rung precisely because the engine no longer owns the whole problem:
- The shard map lives in the application - routing, rebalance, and resharding are your code.
- Cross-shard queries lose the engine’s guarantees - a join across shards is application work; a transaction across shards is a distributed problem.
- Hot keys concentrate - a celebrity row or a hot partition key lands on one shard and recreates the single-writer problem inside the scale-out.
Sharding is correct when the workload genuinely exceeds one writer; it is wrong when a tuned single writer would have been enough. The workload profile lesson is what decides.
The four workload shapes - architecture flowcharts
A high-concurrency platform
Bounded connection pool
Fixed max in-flight requests
The pool is the admission control - beyond it requests queue in the app, not the engine
SQL Server writer
One engine, all writes
Tuned for short transactions - the lock window is the concurrency ceiling
RCSI + short txns
Readers on row versions, writers hold locks briefly
The two settings that keep readers and writers from serialising
Governor pools
Workload groups cap noisy sessions
One bad workload cannot take the schedulers
A read-heavy system
App reads
Routed by consistency need
Read-your-writes traffic to the primary; report traffic to replicas
Read replicas
N async readable secondaries
Each is a full read-only copy - the read ceiling is now a fleet, not a box
Primary (writes only)
The single writer, unburdened of reads
Replication lag is the staleness the architecture accepts
HA replica
A separate synchronous standby for failover
Distinct from the read replicas - durability and scale are different objectives
A write-heavy system
Ingest
Batched commits, not commit-per-row
One flush per batch - the WRITELOG cost amortised
Single writer
The log device and the writer engine
Dedicated fast storage for the log; sequential writes only
Spread keys
Non-sequential or hashed keys
Kills the last-page latch convoy before it forms
Shard when bound
Split by key when one writer is truly exhausted
The expensive rung - only when the profile demands it
A mixed read/write workload
OLTP path
Reads + writes on the primary under RCSI
Readers on versions, writers on locks - minimal mutual blocking
Analytics path
Reports routed to a replica or an analytical platform
A heavy query on the primary is a self-inflicted incident
Governance
Resource Governor caps the noisy path
The report cannot starve the transactions
Shared substrate
Log, tempdb, CPU still one box
The paths split; the hardware does not - the substrate is the next fight
Bottleneck migration - where the next ceiling is
Every fix moves the bottleneck to the next resource; a platform architect predicts the migration:
- Fix the index → the log or tempdb becomes the next ceiling.
- Add a read replica → replication lag and the shared log/substrate are the new limit.
- Scale up the box → the application’s connection pool or the single-writer log is next.
- Shard → cross-shard coordination and the hot key are the new problems.
The skill this lesson teaches is not the rungs - it is naming the next bottleneck before you climb to it, which is what separates a scaling plan from a scaling surprise.
Guided practice
A paper exercise: four systems arrive with a scaling complaint. For each, say which rung of the ladder applies first, what it charges, and where the bottleneck migrates. Work each step and check yourself before moving on. The systems: (a) a read-heavy reporting workload whose primary is read-saturated; (b) a write-heavy ingest where throughput plateaus; (c) a mixed workload where reports and transactions fight; (d) a single writer that has genuinely hit the top of the instance catalogue.
- Separate tuning from scaling for each complaint. Before choosing a rung, classify what each fix would be. Check: a better index, a fixed latch convoy and batching are performance improvements - they lower per-unit cost on the same box without moving the ceiling. A bigger instance, a read replica and a shard raise the ceiling. If you called an index “scaling”, revisit the first section - tuning makes the ceiling comfortable, scaling moves it.
- Solve (a) without touching the writer. Read-heavy, read-saturated primary. Check: read scale-out - async readable replicas serving the report traffic, while read-your-writes stays on the primary. The charge is staleness by replication lag; a synchronous availability secondary is the wrong tool because it buys durability by adding its acknowledgement to the commit path. If you proposed an availability group for read scale, revisit “high availability is not read scaling”.
- Solve (b) before sharding. Write-heavy ingest plateau. Check: the write-heavy levers first - batched commits so one flush serves many rows, a dedicated fast log device, and non-sequential or hashed keys to kill the last-page latch convoy - plus a check of provisioned IOPS, which on a managed platform is a purchased ceiling, not a physical one. If you went straight to sharding, revisit the ladder - the expensive rung is for when one writer is truly exhausted.
- Solve (c) by separating the paths. Mixed read/write contention. Check: OLTP on the primary under RCSI, analytics routed to a replica or an analytical platform, Resource Governor capping the noisy path - and the honest note that the shared substrate (log, tempdb, CPU) is still one box and becomes the next fight. If your design left reports on the primary, revisit the mixed-workload diagram - a heavy query there is a self-inflicted incident.
- Predict the next bottleneck for (d). Writes exceed one writer; you shard. What is the new problem? Check: cross-shard coordination and the hot key - the shard map lives in the application, joins and transactions across shards lose the engine’s guarantees, and a hot partition key recreates the single-writer problem inside the scale-out. If you answered “it scales without limit now”, revisit the sharding bullets - the skill is naming the next bottleneck before climbing to it.
Check your understanding
Ordered easy to hard. Answer each before reading the answer; a wrong answer names where to look.
- What is the difference between a performance improvement and scaling? A performance improvement lowers the cost of each unit of work on the same box; scaling raises the capacity ceiling. Both matter, and confusing them is how a tuned system still hits the wall - if you treated them as synonyms, revisit the first section.
- Why is the scaling menu a ladder rather than a topology? SQL Server has one writer, so each rung raises a different ceiling and none of them distributes writes: tune, scale up, read scale-out, partition or shard, in that order. If you listed the options with no order, revisit the ladder - a rung is climbed only after the cheaper ones stop paying.
- Why is high availability not read scaling? An availability group exists for durability and failover: a synchronous secondary buys the commit’s guarantee by adding its acknowledgement to the commit path - it charges latency on every commit. The real read-scale tool is the async read replica, which serves stale reads by definition. If you counted the availability group as read capacity, revisit that section.
- Why is table partitioning not a scaling rung? It is an administration feature: it splits a logical table into physical partitions so a sliding window can be switched out as metadata rather than deleted row-by-row - cheap retention and partition-level lock escalation, not write load spread across hardware. If you had it raising the write ceiling, revisit the partitioning section.
- What does sharding cost that no other rung charges? The application takes ownership: the shard map, routing, rebalance and resharding are your code; cross-shard queries lose the engine’s guarantees and cross-shard transactions are a distributed problem; and hot keys recreate the single-writer wall inside the scale-out. It is correct only when a tuned single writer is genuinely exhausted - if you cannot name a cost, revisit the sharding bullets.
Where SQL Server sits
How this component relates to the rest of the stack. Items without a link are not covered here yet.
Deployed with
Commonly run alongside
- Windows Failover Clustering