System Design
5. Advanced Database ArchitectureAnimated
Distributed Databases
Databases spread across many machines.
The idea
Data is partitioned and replicated across nodes, with a protocol for consistency and failure handling.
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
Independent machines coordinate only by passing messages.
- step:
- 1/4
- at:
- Node 1
1/8
The green dot is a request moving through the system.
Step by step
- 1Partition data
- 2Replicate partitions
- 3Route requests
- 4Coordinate on writes
Where it is used
Global or very large systems.
Watch out for
Network partitions force trade-offs (CAP).