Lesson 9 of 16
6. Vertical vs Horizontal Scaling

6.8 What does each kind of scaling really cost?

3 min read+10 XP

In the kitchen: One superstar chef can cost more than three good chefs together. Extra chefs for the rush only cost money during the rush. But more chefs also means more managing, more uniforms and more chance of mix-ups.

In the system:

Scale upScale out
Machine costRises steeply for the largest sizesMany ordinary, cheaper machines
Paying for peaksYou pay for the big machine all dayAutoscaling pays only for the rush
Engineering costLow: nothing changesHigher: stateless design, load balancer, monitoring many machines
Failure costOne failure stops everythingOne failure is absorbed

The autoscaling saving, worked out (assumed numbers): Book Fest needs 68 servers for 2 hours a day and 8 the other 22 hours.

  • Always running 68: 68 × 24 = 1,632 server-hours a day.
  • Autoscaled: 68 × 2 + 8 × 22 = 312 server-hours a day, about 81% less.

Cloud pricing options also matter: on-demand (pay by the hour, most flexible), reserved or committed (cheaper for a steady baseline you'll always need) and spot or preemptible machines (much cheaper, but the provider can take them back at short notice, so only for stateless or batch work that can be interrupted).

And don't forget people cost: a design that saves 20% on servers but needs a team to babysit it may not be cheaper.

Memory code: "Pay for the rush only during the rush." Baseline reserved, peaks on demand, interruptible work on spot.