System Design
18. Advanced Distributed ArchitectureAnimated
Leaderless Replication
Any replica accepts reads and writes.
The idea
Clients write to several replicas and use quorums and repair, as in Dynamo.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- latest
- stale
5 replicas each hold the value v1. We choose W=3 (acks needed to write) and R=3 (replies needed to read).
- N:
- 5
- W:
- 3
- R:
- 3
1/4
Change N, W and R to see when reads can be stale.
Step by step
- 1Write to N replicas
- 2Succeed after W acks
- 3Read from R replicas
- 4Repair stale ones
Where it is used
Highly available stores.
Watch out for
Sloppy quorums and conflicts.