Quorums
Tune N, W and R to trade latency, durability and consistency, and learn where quorums leak.
16 min readR + W > N
With N replicas, a write waits for W acknowledgements and a read queries R replicas. If R + W > N, every read set overlaps every write set in at least one replica, so a read sees the latest acknowledged write (taking the highest version among responses). The classic setting is N = 3, W = 2, R = 2: any one replica can be down or slow and both reads and writes still succeed.
- W = N, R = 1: fast reads, but one dead replica blocks writes
- W = 1, R = N: fast writes, fragile reads, weak durability
- W = 1, R = 1: lowest latency, eventual consistency only
Quorums cut tail latency
Because you wait for the fastest W of N, a single slow replica does not slow the request. If each replica independently has a 1% chance of a 100 ms stall, waiting for 2 of 3 is slow only when at least two stall, about 0.03% of the time, versus 1% when waiting for one specific replica. This is why quorum systems often have better p99 latency than a single primary under noisy conditions.
Where quorums leak
R + W > N does not give full linearizability on its own. Concurrent writes with last-write-wins can silently drop one of them. A write that succeeds on fewer than W replicas reports failure but is not rolled back, so later reads may or may not see it. Sloppy quorums, where writes go to stand-in nodes during a failure and are handed back later (hinted handoff), improve availability but break the overlap guarantee. Treat quorums as strong durability and good freshness, not as a lock.
Sizing for failures
A majority quorum of N nodes tolerates floor((N - 1) / 2) failures: 3 nodes tolerate 1, 5 tolerate 2. Place replicas in different availability zones so one zone outage removes only one replica. Going from 3 to 5 replicas raises storage cost by two thirds and adds latency, since each write waits for 3 acknowledgements instead of 2, so justify it with an explicit failure scenario, such as surviving a zone outage while another node is down for maintenance.
Key takeaways
- R + W > N guarantees overlap between read and write sets
- Waiting for the fastest W of N hides slow replicas and improves p99
- Concurrent writes, partial failures and sloppy quorums weaken the guarantee
- Majority quorums tolerate floor((N-1)/2) failures; spread replicas across zones
Sign in to track lessons and earn badges.