// system design · 21 November 2026 · 2 min read
Vertical vs horizontal scaling, explained simply
A bigger machine or more machines. Both work, and the choice changes how you build.
Your app is slow because the server is busy. You have two ways out. Make the server bigger, or add more servers. That is the difference between vertical and horizontal scaling, and most systems end up using both.

Vertical: a bigger machine
Scaling up means more CPU, more memory and faster disks on the same server. Your code does not change at all. You pay more, restart, and things get faster.
It is underrated. One modern machine can do a lot. I once loaded a full day of Wikipedia pageviews, about 143 million rows, on a single laptop, and proved every row was accounted for. That project is in how my data checks lied.
The limits are real though. There is always a biggest machine you can buy, the price climbs fast near the top, and if that one machine goes down, everything goes down with it.
Horizontal: more machines
Scaling out means running several copies of your app and putting a load balancer in front of them. Busy? Add server 4. Quiet night? Remove one and stop paying for it.
You also get resilience for free. If one server crashes, the others keep answering.
The catch: your app has to be ready
Horizontal scaling only works if any server can answer any request. That means the server should not keep anything important in its own memory between requests.
A classic example is a login session stored in one server’s memory. The user logs in on server 1, the next request lands on server 2, and server 2 has never heard of them. The fix is to keep shared state in a shared place, such as a database or a cache like Redis, so every server sees the same thing. Engineers call this making the app stateless.
A tiny worked example
Say one server handles 500 requests per second and you need 1,500.
- Vertical: buy a machine about three times bigger. Same code, one box, one point of failure.
- Horizontal: run three of today’s servers behind a load balancer. A bit more setup, but you can add a fourth next month without touching the first three.
Which one first
Start vertical. It is the cheapest change in effort, and a bigger machine buys you time to learn where the real bottleneck is.
Go horizontal when one machine is no longer enough, when you cannot afford downtime, or when your traffic goes up and down and you want to pay only for what you use.
And before either, check whether the slowness is the work itself or repeated work you could skip. Sometimes the cheapest scaling is a cache.
Muhammad Mairaj is a Senior Backend Engineer with 8 years building payment and data systems. He writes about data engineering, measured. More about him.