System Design
5. Advanced Database ArchitectureAnimated
Database Federation
Splitting databases by function.
The idea
Users, orders and products live in separate databases, reducing load on each.
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
Step one: add indexes and cache.
- step:
- 1/4
- at:
- App servers
1/7
The green dot is a request moving through the system.
Step by step
- 1Group tables by domain
- 2Give each group its own database
- 3Route queries by domain
- 4Join in the application
Where it is used
Growing applications before sharding.
Watch out for
Cross-database joins are no longer possible in SQL.