System Design
5. Advanced Database ArchitectureAnimated
Synchronous Replication
The primary waits for replicas before confirming a write.
The idea
Commits are acknowledged only after replicas have the data, so none is lost on failover, but writes are slower.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- current message
- earlier
- failure or attack
A producer sends a message.
- step:
- 1/6
- from:
- Producer
- to:
- Broker
1/6
Time runs downward. Solid arrows are requests, dashed arrows are replies.
Step by step
- 1Client writes
- 2Primary sends to replica
- 3Replica confirms
- 4Primary acknowledges the client
Where it is used
Financial data.
Watch out for
Writes slow down or stop if a replica is slow or unreachable.