← System Design learning path
System Design · Module 2 of 10

Scaling basics

Scale vertically and horizontally.

📖 Key ideas

  1. Vertical scaling: bigger machine (more CPU/RAM).
  2. Horizontal scaling: more machines behind a load balancer.
  3. Stateless servers scale horizontally easily.
  4. Store session state in shared stores (Redis) or tokens.
  5. 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