← System Design learning pathSystem Design · Module 2 of 10
Scaling basics
Scale vertically and horizontally.
📖 Key ideas
- Vertical scaling: bigger machine (more CPU/RAM).
- Horizontal scaling: more machines behind a load balancer.
- Stateless servers scale horizontally easily.
- Store session state in shared stores (Redis) or tokens.
- Auto-scaling adds capacity based on demand.
💡 Real-life example: Vertical scaling is a bigger bus; horizontal scaling is more buses on the route.
Vertical scalingUpgrading one machine
Horizontal scalingAdding more machines
Stateless serviceNo session stored on the server
Auto-scalingAutomatic capacity changes