Lesson 3 of 16
6. Vertical vs Horizontal Scaling

6.2 What is vertical scaling?

3 min read+10 XP

In the kitchen: Replace your chef with a bigger chef: more hands, a bigger stove, a bigger counter. Nothing else in the kitchen changes. But there's a limit to how big one chef can get, and the bigger they are, the more they cost per plate. And if they're off sick, the kitchen is closed.

In the system: Vertical scaling (scaling up) means giving one machine more resources: more CPU cores, more RAM, faster disks, a faster network card.

Why it's attractive:

  • No code changes. The same program just has more room.
  • No network between parts. Everything is in one machine's memory, which is fast and simple.
  • Great for things that are hard to split, especially databases. Many databases go a very long way on one large machine.

Its limits:

  • A hard ceiling. Cloud providers rent very large machines, with hundreds of cores and terabytes of memory, but there's always a biggest one.
  • Price climbs steeply near the top. The largest machines usually cost more per unit of CPU or memory than mid-sized ones.
  • Still one point of failure. One bigger machine is still one machine. If it dies, everything on it stops (Chapter 29).
  • Resizing often means a restart. On most clouds, changing a machine's size means stopping and starting it, so it needs planning.

Memory code: "Bigger chef, same kitchen, same ceiling."