What it is
In a replicated store each key lives on N replicas. A write quorum is the number of replicas, W, that must confirm a write before the client is told it succeeded; a read quorum is the number of replicas, R, whose answers a read waits for. Choosing W and R per request (Cassandra calls them consistency levels: ONE, QUORUM, ALL, LOCAL_QUORUM …) tunes each operation between speed, availability and freshness.
Why it exists
Waiting for every replica (W = N) is safe but slow and fragile: one slow replica slows every write, one dead replica stops them. Waiting for one (W = 1) is fast and available, but a read may hit a replica that hasn't got the write yet. Quorums sit between the two, and the arithmetic tells you exactly what you get.
How it works
Write. The coordinator sends the write to all N replicas in parallel and answers the client as soon as W have confirmed. The remaining replicas still apply it; the client just doesn't wait for them.
Read. The coordinator asks replicas (all N, or R of them plus a spare) and returns the newest version among the first R answers. Versions come from timestamps or version vectors attached to every value.
Overlap: W + R > N. If a write reached W replicas and a read asks R, the two sets must share at least one replica whenever W + R > N: there are not enough replicas for them to be disjoint. That replica has the latest acknowledged write, and because the read picks the newest version, the read sees it. With N = 3, W = 2, R = 2 gives 4 > 3. With W = 1, R = 1 (2 ≤ 3) the write and the read can land on different replicas, and the read can be stale right after a successful write.
Fault tolerance. Writes keep working while at least W replicas are reachable, reads while at least R are. A majority quorum, W = R = ⌊N/2⌋ + 1, satisfies W + R > N and tolerates ⌊(N − 1)/2⌋ failures for both: one for N = 3, two for N = 5. W = N tolerates none for writes; R = N none for reads.
Latency is an order statistic. A quorum waits for its W-th (or R-th) fastest member. With replicas answering after 5, 11 and 50 ms, W = 2 answers at 11 ms and W = 3 at 50 ms. Majority quorums hide one slow replica (a garbage-collection pause, a far zone); W = N exposes every write to the slowest one. This is why quorum systems often keep replicas in nearby zones and use LOCAL_QUORUM within a region.
Read repair. When a read sees an older version on some replica, the coordinator writes the newest value back to it. This narrows the window in which later reads with smaller R would see stale data.
Sloppy quorums and hinted handoff. If home replicas are unreachable, a Dynamo-style store may accept the write on other nodes, with a hint saying where it belongs, and count those toward W. That keeps writes available, but a read of the home replicas need not overlap those stand-ins, so W + R > N no longer guarantees anything until hinted handoff moves the data home. (Cassandra does not count hints toward the consistency level, except at level ANY.)
When to use it
- Leaderless stores (Cassandra, ScyllaDB, Riak, DynamoDB internally) where you want per-request control over consistency and availability.
- Majority quorums for data that should survive a replica failure without failover and be read back reliably.
- Smaller W or R deliberately for data where staleness is acceptable and latency matters: counters, feeds, telemetry.
When not to
- When you need linearizability (compare-and-set, uniqueness, leases, "exactly one winner"). Quorums alone don't provide it; use consensus (Raft, Paxos) or a single leader.
- Across distant regions on the hot path. A global quorum waits for remote replicas;
LOCAL_QUORUMplus asynchronous cross-region replication is the usual compromise. - W = N or R = N unless you accept that any single failure blocks that operation.
Trade-offs
| Setting (N = 3) | Overlap | Tolerates for writes / reads | Latency | Typical use |
|---|---|---|---|---|
| W = 1, R = 1 | No | 2 / 2 | Fastest replica | Telemetry, caches, counters |
| W = 2, R = 2 | Yes | 1 / 1 | Second-fastest | General default (QUORUM) |
| W = 3, R = 1 | Yes | 0 / 2 | Writes: slowest | Read-heavy, rare writes |
| W = 1, R = 3 | Yes | 2 / 0 | Reads: slowest | Write-heavy, rare reads |
| Sloppy W = 2 | Not guaranteed | Writes almost always succeed | Second-fastest reachable | Maximum write availability |
Alternatives
- Single leader with synchronous or semi-synchronous replicas: one place orders writes; reads from the leader are fresh.
- Consensus (Raft, Paxos): majorities as well, but with a leader and a log, which gives linearizable reads and writes.
- Multi-leader replication: writes everywhere with asynchronous convergence and explicit conflict resolution.
Failure modes
- Stale reads with W + R ≤ N, by design, often misconfigured by accident (writes at
ONE, reads atONE). - Partial writes. A write that reached fewer than W replicas is reported as failed, but the replicas that applied it keep it; later reads may or may not return it. The client cannot tell.
- Concurrent writes. Two writes to the same key can each reach a quorum; the store must keep siblings or pick one (LWW), possibly losing an acknowledged write.
- Sloppy quorum gaps. Writes accepted on stand-in nodes are invisible to strict reads until handoff, and lost if the stand-in fails first.
- Tail latency. A slow replica raises latency for every operation that needs it, most visibly at W = N or R = N.
In production
Cassandra and ScyllaDB expose consistency levels per query; most applications use LOCAL_QUORUM for both reads and writes with replication factor 3 per data centre. Read paths often add speculative retry (ask another replica if one is slow) to cut tail latency. Riak exposes N, R, W per bucket or request. DynamoDB uses quorum-style replication internally and offers eventually or strongly consistent reads. Monitor per-replica latency, hint backlogs and repair progress; schedule anti-entropy repair so replicas that missed writes catch up.
Common misconceptions
- "W + R > N means strong consistency." It gives overlap with the latest acknowledged write under strict quorums. Sloppy quorums, partial writes and concurrent writes still allow anomalies; it is not linearizability.
- "Higher W is always safer." W = N makes every write fail when one replica is down.
- "A quorum is as fast as the average replica." It is as fast as its W-th or R-th fastest member.
- "Quorum means majority." A quorum is any W and R you choose; majority is one common choice.
Interview angle
When a design uses a Dynamo-style store, state N, W and R and the reason: "RF 3, LOCAL_QUORUM for writes and reads: W + R = 4 > 3, tolerates one replica down per data centre, latency is the second-fastest local replica." Then name the limits: sloppy quorums and hinted handoff, read repair and anti-entropy for convergence, and that uniqueness or compare-and-set needs consensus or a lightweight transaction.
Model assumptions
The engine parts of this lesson are a simplified model, not a benchmark. The app sends 100 writes per second (Poisson arrivals, 50 keys with Zipf popularity) to Replica A, which coordinates. Every replica has 16 connections and a 10 ms mean write (lognormal, cv 0.3). A is 2 ms from the app, Replica B 5 ms from A, Replica C 40 ms from A in another zone. W counts A's own copy: W = 1 is asynchronous replication (A answers after its own write), W = 2 waits for the first of B and C to apply the write, W = 3 for both. A write copy takes the hop to the replica plus 1 ms to apply, and the confirmation takes the hop back; A counts its own copy and answers when the W-th confirmation reaches it, holding one of its connections until then. A replica that is down never confirms (A notices at once, without a timeout) and misses the writes of its outage. In the W + R ≤ N step a separate reader reads the same keys from Replica C alone (R = 1, 10 ms away); a read is counted as stale when C has not yet applied a write A had already acknowledged for that key. The engine has no read quorums, versions, read repair, hints or stand-in nodes, so the R = 2 read with read repair and the sloppy quorum are scripted illustrations with the same one-way times (plus a 1 ms apply time), with traffic paused. Numbers show behaviour and orders of magnitude only.
How to read this demonstration.
- Actual engine simulation: the write path for W = 1, 2 and 3 (own write, copy to the replicas, apply, confirmation back, the W-th confirmation answers), a replica going down, and the stale-read counter for a separate reader that reads Replica C alone (R = 1).
- Scripted animation: the R = 2 read, read repair, and the sloppy quorum with hinted handoff (including its partition); these steps pause traffic and play packets.
- Hybrid demonstration: the W + R ≤ N step: the stale reads come from the engine, the arithmetic about overlap is explained in text.
- Simplified model: one coordinator, three replicas, fixed distances, no versions: a read is stale when the replica has not yet applied a write the coordinator already confirmed.
- Time compression: slow motion (about 0.08 to 0.12 times real time, and 0.025 for the scripted illustrations) so the packets can be followed.
- Not supported by the simulation: read quorums (the engine has no R > 1 reads: the R = 2 behaviour is scripted), read repair, hinted handoff and stand-in nodes, version vectors or timestamps, anti-entropy, network partitions, Raft or any consensus protocol.