Learn
Lesson · Replication and Consistency · What it costs

Reads Scale, Writes Do Not

Adding replicas buys read capacity and nothing else. N copies serve N× the reads, accept 1× the writes however many you buy, apply N× the write work and hold N× the bytes. What a real mixed workload gains is 1/(w + r/N), and the ceiling on that is 1 + ρ — a property of the read/write ratio rather than of the fleet, which is why a write-heavy service gets nothing from replication and pays N times for it.

N replicas: N× reads, 1× writes, N× write work, N× storage ρ reads per write: w = 1/(1 + ρ) writes, r = ρ/(1 + ρ) reads speed-up(N) = 1 / (w + r/N) only the read share divides ceiling = 1 + ρ set by the mix, never reached N = 3, ρ = 9: 2.5× of a ceiling of 10×, for 3× the write work
Four multipliers, and the one that never moves

Core ideas

What this lesson establishes

Three sentences, and the third decides whether the replication factor was worth buying at all.

1

Every replica applies every write

A copy that skipped a write would not be a copy. So each write is applied N times, once per replica, and the rate at which the cluster can accept writes is exactly the rate at which one machine can apply them — 1×, at N = 3 and at N = 30. The N× that replication is sold on is the read side and only the read side.

2

Only the read stream divides

Reads can be served by any replica that holds the data, so N replicas serve N times the reads of one. That is a genuine multiplier and it is the reason to replicate. It is also the only one of the four numbers that moves in your favour: the write work and the storage move against you at exactly the same rate.

3

The ceiling belongs to the workload, not to the fleet

If a fraction w of operations are writes and r = 1 − w are reads, the cluster does 1/(w + r/N) times the work of one machine. Send N to infinity and the reads cost nothing, leaving 1/w = 1 + ρ. At nine reads per write that ceiling is 10×; at one read per write it is 2×; at zero reads it is 1×. No number of replicas raises it, because every replica still applies every write.

The material

What a replication factor buys, and what it bills

The four multipliers, the speed-up a real mix actually gets, and the ceiling that no fleet size reaches.

Definition · Replication factor, and the four multipliers

A replication factor of N keeps N complete copies of the data. Against a single machine it multiplies read capacity by N, write capacity by 1, write work by N and storage by N. The first is the benefit; the other three are the bill.

The asymmetry is not an implementation detail that a better design removes. It follows from what a replica is. A read is answered by one copy, so copies divide the read stream between them; a write must reach every copy, so copies multiply the write stream instead.

one replica serves 1000 ops/s, ρ = 9 reads per write N read capacity write capacity write work storage 1 1000 reads/s 1000 writes/s 1× 1× 2 2000 1000 2× 2× 3 3000 1000 3× 3× 4 4000 1000 4× 4× column three is constant by construction, not by coincidence

Neither of the first two columns is what the cluster serves, because a real workload is a mix. The read capacity is what you would get if every operation were a read, and the write capacity is what you would get if every operation were a write. The mix decides where between them you land.

The mix decides, and it sets a ceiling

at ρ = 9 reads per write: w = 1/10 of the ops are writes r = 9/10 are reads speed-up(N) = 1 / (w + r/N) N = 1 1 / (1/10 + 9/10) = 1× N = 3 1 / (1/10 + 3/10) = 1/(2/5) = 2.5× N = 12 1 / (1/10 + 3/40) = 1/(7/40) = 5.714…× N → ∞ 1 / (1/10) = 10× = 1 + ρ

The shape is the one Scaling Laws and Cost will name: a serial part that no amount of parallelism divides. Here the serial part is the write, and it is serial in a precise sense — every machine does all of it. Three replicas at nine reads per write reach 2.5× of a possible 10×, and the remaining nine machines in the world cannot close that gap.

Example · The write-heavy service

At ρ = 0 — every operation a write — w = 1, so speed-up(N) = 1/(1 + 0) = 1× at every N, and the ceiling 1 + ρ is 1× as well. Three replicas serve exactly what one served, for three times the storage and three times the write work. This is not a corner case: an append-only ingest path, a metrics writer or an audit log can sit very close to it, and replicating one of those buys durability and availability and no throughput whatsoever. Those are good reasons to replicate. They are not this reason.

So the honest report of a replication factor is four numbers and a ratio, not one number. “We tripled the replicas” is a statement about the storage bill; whether it is also a statement about throughput depends entirely on ρ, and ρ is a measurement of the workload that Capacity Estimation already taught you to take.

Interactive

Reads scale, writes do not

Four multipliers, and the read/write ratio that caps the third

What a replication factor buysN× reads, 1× writes, N× work, N× storage
read capacitywrite capacitywrite work and storagethe ceiling

Method

Pricing a replication factor

The ratio comes first. Every number after it is arithmetic, and every argument about whether replication helped is really an argument about ρ.

1

Measure the read/write ratio before anything else

ρ is reads per write on the workload you actually have, not the one in the design document. A cache in front of the database removes reads and lowers ρ, which lowers the ceiling; a fan-out that turns one user action into twenty reads raises it. Take this number from a trace.

2

Write the four multipliers down separately

N× reads, 1× writes, N× write work, N× storage. Keeping them apart is what stops the read multiplier from being quoted as though it were the cluster's.

3

Compute the speed-up, and put the ceiling beside it

1/(w + r/N) against 1 + ρ. Two numbers, always together: the second says how much of the possible gain the first one is, and how much buying more machines could ever add.

4

Charge the write work and the storage against the gain

N times the bytes and N times the write applications are paid whether or not the reads arrived. If the speed-up is 2.5× for a 3× bill, say so; that may still be the right trade, but it is a trade and not a win.

Four currencies, one ratio

Score 0 / 0

Three replicas at nine reads per write

One machine serves a thousand operations a second. The workload is nine reads for every write. Two more machines are added. The question is what each of the four currencies did.

one replica 1000 ops/s N = 3 ρ = 9 reads per write read capacity 3 × 1000 = 3000 reads/s write capacity 1000 writes/s at every N write work 3× every replica applies every write storage 3× the bytes, three times the mix w = 1/10 writes, r = 9/10 reads speed-up 1 / (1/10 + (9/10)/3) = 1 / (1/10 + 3/10) = 1 / (2/5) = 5/2 = 2.5× cluster 2.5 × 1000 = 2500 ops/s of which 2250 reads/s and 250 writes/s ceiling 1 + ρ = 10×, and 2.5× is a quarter of it N = 12 1 / (1/10 + (9/10)/12) = 40/7 = 5.714…×

Two and a half times the work for three times the storage and three times the write applications. That is a defensible trade and it is not the 3× the replication factor suggests, because a tenth of the operations were never going to divide.

The last line is the one that changes decisions. Going from three replicas to twelve — four times the fleet — takes the speed-up from 2.5× to about 5.71×, a little over double, and the ceiling is still 10×. Replication is subject to diminishing returns that are set by the workload, and the way to raise the ceiling is to change ρ, which means caching or batching the writes, not buying machines.

For a faded rehearsal, take the same service at ρ = 2 reads per write. The supplied first move is w = 1/3, so the ceiling is 3×. Compute the speed-up at N = 3 and at N = 12, say what fraction of the ceiling each reaches, and state the storage bill beside each before you check them in the lab.

Common mistakes

1
Quoting N× for the cluster when it is N× for the reads onlyThe read capacity and the cluster throughput are different numbers and they differ by the mix. At ρ = 9 and N = 3 they are 3000 and 2500; at ρ = 1 they are 3000 and 1500; at ρ = 0 they are 3000 and 1000. Any capacity plan that used the first number has over-provisioned its confidence and under-provisioned its machines.
2
Forgetting that the write work is billed N timesEach replica applies the full write stream, so the cluster's total write work is N times one machine's — N times the disk writes, N times the index maintenance, N times the compaction. It is invisible in a throughput number and very visible in a bill, and it is the reason a write-heavy service gets slower per unit of cost as it is replicated.
3
Reading the ceiling as something a larger fleet reaches1 + ρ is a limit, not a target. Every replica still applies every write, so the write share of the work never divides, and the speed-up approaches 1 + ρ without arriving. If 2.5× of a possible 10× is not enough, the lever is ρ — cache the reads elsewhere, batch the writes — because the lever N has already been most of the way pulled.

Check your understanding

✓
Finish when “we added replicas” makes you ask for the read/write ratio before anything else.

You should be able to state the four multipliers for a given N without hesitating, compute 1/(w + r/N) and the ceiling 1 + ρ beside it, say what a write-only workload gains from replication, and name the storage and write-work bill in the same sentence as the throughput gain.

Note: That prices replication in capacity. It also has a latency, and the next lesson, “Synchronous Writes Wait for the Slowest”, is where most readers get a number badly wrong for the first time on this course: asked what three replicas cost in write latency against one, almost everyone multiplies, and the write is not waiting for a sum.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.