Leaderless replication
Some systems (Dynamo-family) let clients write to any of N replicas and use quorums to decide when a read or write is successful.
The quorum rule
- N — replica count
- W — replicas that must ack a write
- R — replicas contacted for a read
If R + W > N, a read and write overlap on at least one replica — you often get strong consistency for that object if there is only one concurrent writer.
Example: N=5, W=3, R=3 → overlap of 1 node minimum.
Tunable trade-offs
| Setting | Effect |
|---|---|
| W=1, R=1 | Fast, stale/anomalous reads possible |
| W=N, R=1 | Slow writes, faster reads, durable |
| W=quorum, R=quorum | Balanced Dynamo default |
Cassandra exposes this as ONE, QUORUM, ALL consistency levels per query.
Sloppy quorums & hinted handoff
When fewer than N nodes are reachable, sloppy quorum may write to alternate nodes with hinted handoff to return data to the right replicas later — improves availability, weakens strict quorum guarantees. Know the term; don't implement from scratch in an interview.
When quorums aren't enough
Concurrent writers to the same key can still conflict — need version vectors or last-write-wins with known downsides (Topic 5). Quorums prevent stale reads from completed writes under single-writer assumptions, not all anomalies.
Interview drill
Given N=3, W=2, R=2: one replica is down. Can you still write? Still read strongly? Walk through the arithmetic aloud.
Further Reading
Hands-On Tasks (Optional)
Low-setup exercises — browser visualizers, paper drills, or optional Docker. No autograding; the goal is interview fluency.
- Quorum arithmetic drill15m
N=5, W=3, R=3: can a read return stale data after a successful write? Try W=2, R=2 with N=5. Try W=1, R=1. Write the R+W>N rule and one counterexample when it isn't enough (hint: concurrent writers).