System Design
8. Load Balancing and ScalabilityAnimated
Database Scaling
Growing database capacity.
The idea
Use indexes, caching, read replicas, partitioning and sharding.
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
- 1Optimise queries and indexes
- 2Add caching
- 3Add read replicas
- 4Shard when writes exceed one node
Where it is used
Growing data.
Watch out for
Each step adds complexity. Start with the simplest.