Academy · Consistency & Consensus
Quorums (R + W > N)
With N replicas, how many must respond to a read/write so you never read stale data?
Open the interactive version → diagrams, practice & moreThe problem
With N replicas, how many must respond to a read/write so you never read stale data?
The idea
Require overlapping majorities: if read quorum R + write quorum W > N, every read sees the latest write.
How it works
Write to W replicas, read from R, with R+W>N guaranteeing overlap. W>N/2 also stops two conflicting writes from both succeeding. Tune R/W for read- vs write-heavy needs.
The tradeoff
Bigger quorums = stronger consistency but higher latency and lower availability under failures.
In the wild
Dynamo-style stores expose N/R/W (classic N=3, R=2, W=2).
Interview deep dive
Flow
- Replicate each value to N nodes.
- Accept a write only after W replicas acknowledge it.
- Serve a read after R replicas respond.
- Because R+W>N, the read overlaps at least one latest writer.
Watch for
- Quorums do not remove conflict resolution in AP stores.
- Higher R improves read freshness but hurts read latency.
- Higher W protects writes but rejects more during failures.
Interviewer trap
Use numbers in the answer: for N=3, compare R=1/W=3 with R=2/W=2.
Related Academy
Part of Academy on SystemLore — system design interview prep with 148 deep topics, interactive diagrams, and a practice game. Practice this one →