Skip to content
StackDecode
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.

ClientsLoad balancerNode A (live)Node B (live)
  • 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

  1. 1Write to the local leader
  2. 2Replicate to other leaders
  3. 3Detect conflicts
  4. 4Resolve them

Where it is used

Multi-region writes.

Watch out for

Conflict resolution is hard.

Related