Skip to main content
Scalingchapter 1 of 4 · 4 lessons

Vertical vs Horizontal Scaling

Scale up (bigger machine) vs scale out (more machines).

Your booking site ran fine on one server all year. Then a review went up, traffic doubled inside a week, and that machine now sits busy 85 percent of the time. At 95 percent it starts refusing people.

You have two moves, and they cost about the same this month. Buy a bigger machine, which takes an afternoon. Or buy more machines, which takes a quarter.

That fork decides more of your architecture than any other question here, because the second option quietly rewrites the rules for sessions, uploaded files, caches and scheduled jobs. Everything you were keeping on that one machine stops working the day there are two.

Lessons

4 in this chapter
  1. Scaling Up: The Bigger BoxOne machine, more of everything. Underrated until the ceiling, dangerous after it.2 min
  2. Scaling Out: More BoxesAdd servers behind a balancer. Capacity is half the sale; redundancy is the other half.2 min
  3. What Breaks When You Go HorizontalEvery hidden assumption that there is exactly one server becomes a bug in the same week.2 min
  4. Choosing in an InterviewSplit the answer by tier, do the arithmetic out loud, and name the cost you accepted.2 min