teacher
Sign in

Scaling Basics

Vertical versus horizontal scaling, why stateless services scale easily, and where the state has to go instead.

20 min4 interactive

What scaling means

Scaling means making a system handle more load: more users, more requests per second, more data. You scale when one machine can no longer keep up, or when one machine failing would take you down.

Two questions come first:

  • What is the bottleneck: CPU, memory, disk, network, or the database?
  • Is the load growing, or is it just spiky?

Without numbers, scaling is guessing. Estimate requests per second first (see the back-of-the-envelope lesson), then pick a fix.

Estimate
A service gets 50 million requests per day, spread evenly. Roughly how many requests per second is that on average?
req/s
1 of 7