Vertical vs Horizontal Scaling
Bigger or more.
Your app is getting slow because more people use it. You have two choices. Buy a bigger machine, or add more machines. These are called vertical and horizontal scaling.

- More users, slower app
- A bigger machine
- Or more machines
Two ways to grow
Vertical scaling means a bigger server, with more CPU and memory. It's simple, because nothing in your code changes. But there's a ceiling, and one machine is still a single point of failure. Horizontal scaling means more servers working together. There's almost no ceiling, and one can fail safely. But it's more complex.
Vertical: bigger
- Simple, no code changesHas a ceilingOne machine can fail
Horizontal: more
- Almost no ceilingSurvives a failureMore complex
What usually happens
In practice, most companies do both. They start with one decent machine, and scale vertically while it's cheap. When they hit limits, they scale out, adding servers behind a load balancer. Most of this course is about making horizontal scaling work.
| key | value |
|---|---|
| Day one | one server |
| Growing | a bigger server |
| Big | many servers |
| This course | making 'many' work |
Summary
Vertical scaling buys a bigger machine, horizontal scaling adds more machines. Big systems scale horizontally. Next, the first step of every design. Requirements.
Key takeaways- Vertical: simple, limited
- Horizontal: unlimited, complex
- Most do both