System Design
18. Advanced Distributed ArchitectureAnimated
Multi-Leader Replication
Several nodes accept writes.
The idea
Each leader replicates to the others, so every region can write locally.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- client
- gateway / proxy
- service
- cache
- data store
- queue / stream
Both nodes serve traffic at all times.
- step:
- 1/4
- at:
- Clients
1/11
The green dot is a request moving through the system.
Step by step
- 1Write to the local leader
- 2Replicate to other leaders
- 3Detect conflicts
- 4Resolve them
Where it is used
Multi-region writes.
Watch out for
Conflict resolution is hard.