System Design
18. Advanced Distributed ArchitectureAnimated
Globally Distributed Databases
Databases spanning the globe.
The idea
Systems such as Spanner and CockroachDB replicate and shard worldwide with consensus.
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
Users are routed to the nearest region for low latency.
- step:
- 1/4
- at:
- Users EU
1/10
The green dot is a request moving through the system.
Step by step
- 1Shard data
- 2Replicate with consensus
- 3Place leaders near users
- 4Use synchronised clocks or hybrid logical clocks
Where it is used
Global applications.
Watch out for
Write latency crosses regions.