System Design
18. Advanced Distributed ArchitectureAnimated
Eventual Consistency at Scale
Replicas converge, with explicit handling of anomalies.
The idea
At large scale the system accepts temporary differences and designs the product around them.
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
- 1Accept local writes
- 2Propagate in the background
- 3Resolve conflicts
- 4Converge over time
Where it is used
Global feeds and counters.
Watch out for
Users can see odd states. Design the UX for it.