Notesreplication🌱 seedling
Leaderless Replication
Also: Dynamo-Style Replication · Leaderless Quorum Replication
No replica is special: writes and reads go to all n replicas of a key in parallel and succeed once w (or r) respond. Stale replicas are fixed later by read repair and anti-entropy, not by a log.
Why it exists
Built for "always writeable" stores such as Amazon's shopping cart: there's no leader to fail, no failover, and a write succeeds as long as enough replicas are reachable.
How it works
- Each key has n replicas. The client, or a coordinator node acting for it, sends each write to all n and waits for w acknowledgements.
- Reads go to all n and wait for r responses; each carries a version, and the newest wins. See Quorum.
- A replica that was down just misses writes; it catches up via Read Repair, hinted handoff or Anti-Entropy.
- Concurrent writes need resolution: Last Write Wins, Version Vectors with siblings, or CRDTs.
Trade-offs
| Gains | Costs |
|---|---|
| no failover; tolerates n − w down for writes | never linearizable, even with strict quorums |
| tunable latency vs freshness per request | conflicts on concurrent writes |
| no single write bottleneck | repair is an operational duty |
In practice
- Cassandra exposes the choice per query as a consistency level (
ONE,QUORUM,LOCAL_QUORUM,ALL). - Amazon DynamoDB is not leaderless despite the name: it elects a leader per partition with Multi-Paxos.
Pitfalls
- Assuming quorum reads are strongly consistent. See Quorum for the edge cases.
Connections
- Part of
- Replication
- Contains
- Anti-EntropyQuorum
- Contrasts with
- Leader-Based ReplicationMulti-Leader Replication
- Related
- Read RepairSloppy Quorum
- Mentioned
- Last Write WinsVersion VectorCRDT
Recall
These cards are also in your review deck, scheduled with spaced repetition.