DISTRIBUTED SYSTEMS & ARCHITECTURE · SUBTOPIC
Quorum Reads & Writes (W + R > N)
Tune consistency vs. availability in leaderless stores by adjusting N, W, and R.
AdvancedPart of Consistency Models
Subtopics in Consistency Models (2)
In plain words
If 5 friends keep copies of a score (N=5), and you tell at least 3 friends every update (W=3) and ask at least 3 friends whenever you check (R=3), at least 1 friend you ask is guaranteed to know the newest score!
Think of it like…
Pigeonhole principle: 3 + 3 > 5 guarantees overlap.
Loading interactive diagram
Loading interactive exercise
Theory & how it works
Why W + R > N isn’t enough alone for true linearizability
If two writers update simultaneously, timestamps can tie or read-repair may still be in flight. Production Dynamo-style stores pair W + R > N with sloppy quorums / hinted handoff, read-repair, and Merkle trees (anti-entropy) to converge replicas cleanly.
Key points & practical guide
Summary checklist
- N = replicas, W = write acks needed, R = read responses needed
- Common balanced setting: N=3, W=2, R=2
- Use W=1, R=N for fast writes; W=N, R=1 for ultra-fast reads
When to use it
- Cassandra, DynamoDB-style leaderless clusters
Watch out for
- Thinking W+R>N gives bank-grade serializable transactions without consensus or LWT
Quick check
Loading quiz