In this lesson · topic 4 of 7
Topic 4
What R plus W above N still does not promise
6 min read
The figures below are simulator output with fixed seeds, each pinned by a test. Hover any of them for its setup.
Staleness against R and W
Five replicas, nothing unreachable, none slow, stale reads as a share of reads:
| R | W | R + W | Stale reads |
|---|---|---|---|
| 1 | 1 | 2 | 5.5%measured |
| 2 | 2 | 4 | 0.42%measured |
| 2 | 3 | 5 | 0.10%measured |
| 3 | 3 | 6 | 0.0%measured |
Stale reads fall as R plus W grows, and stop completely once it exceeds five. Note the row where R plus W equals N. It is not enough. The sets can still be disjoint, and a few reads do miss. With 25 percent of replicas unreachable per request, R=3 and W=3 still gave 0.0%measured stale reads. Failures do not weaken the guarantee. They make some operations fail instead.
Latency is the k-th fastest reply
Five replicas, two of them slow (about eight times slower), median latency in ms:
| Quorum size | Median read latency |
|---|---|
| 1 | 4.4measured |
| 3 | 13.7measured |
| 4 | 42.8measured |
| 5 | 90.2measured |
Writes follow the same curve. A write quorum of three had a median of 13.7measured ms and a quorum of four had 42.8measured ms.
Three fast replicas mean a quorum of three skips the slow ones. The fourth reply has to come from a slow replica, and the median latency leaps. A quorum of five waits for the slowest. This is why one slow node does damage in quorum systems once the quorum is large enough to include it, and why hedged requests and tail-latency work matter there.
Availability under failures
Five replicas, each unreachable with probability one in four, share of writes accepted:
| W | Writes accepted |
|---|---|
| 1 | 100%measured |
| 3 | 90%measured |
| 5 | 24%measured |
These match the chance that at least W of five replicas are up, which a test checks against the exact binomial value. Reads follow the same curve with R. Notice that W=5 does worse than a single machine would: the more replicas an operation needs, the more chances for one to be down.
The sloppy quorum trade
R=3, W=5, one request in five has a given replica unreachable. A strict quorum accepted 33%measured of writes. A sloppy quorum accepted 100%measured, since stand-in nodes filled the gaps. With R=3, W=3 and one in four unreachable, the sloppy quorum served 1.8%measured stale reads, which a strict quorum never does.
Read repair
R=1, W=1, one request in five unreachable and two slow replicas. Without read repair, 21.5%measured of reads were stale. With read repair, 14.7%measured. It helps, but a read can only repair what it sees, so it cannot make R=1 safe.
What a quorum does not give you
R plus W above N is a statement about reads that start after a write was acknowledged. It does not make the store behave like one machine.
- Concurrent operations. A read that overlaps a write may return either value, and two reads can disagree.
- Failed writes. A write that reaches fewer than W replicas is reported as failed, but the replicas that got it keep it. A later read may return a value the client was told did not happen.
- Sloppy quorums. As measured above, they give the overlap up.
- Clocks. If versions are timestamps, skewed clocks can make an old write beat a newer one.
- Many keys. Each key has its own replicas, and there is no order across keys.
The Bailis paper on probabilistically bounded staleness estimates how long stale windows last from latency measurements of real deployments, and is the place to start. The model here is simpler: one key, independent failures, a fixed latency distribution, and a single writer’s counter.