Scalability Overview
Designing systems that handle growing load without degrading performance.
Scaling Strategies
| Strategy | Description |
|---|---|
| Vertical scaling | Add more CPU/RAM to a single machine |
| Horizontal scaling | Add more machines behind a load balancer |
| Database sharding | Split data across multiple databases |
| Caching | Store frequently accessed data in memory |
Load Balancing
Distribute incoming requests across multiple servers:
Client → Load Balancer → [Server 1, Server 2, Server 3]
Caching Layers
- CDN — static assets at the edge
- Application cache — Redis/Memcached for hot data
- Database query cache — reduce repeated queries