Vertical vs horizontal scaling — the basics

The starting-point question behind almost every other lesson in this domain — what do you actually do once one server isn't enough anymore.

Beginner

3 min read

Why "just get a bigger server" is the first instinct

A brand-new application usually runs on a single server, and for a while, that's genuinely fine — one machine can handle a real amount of traffic. The first time it starts struggling (slow responses, timeouts under load), the obvious first move is: get a more powerful machine. This is vertical scaling — increasing the resources (CPU, RAM, disk speed) of the single server you already have, without changing anything about how the application itself is built.

Vertical scaling: simple, but with a hard ceiling

Vertical scaling is appealing because it requires no changes to the application's code or architecture — the app doesn't even need to know its server got bigger. But it has two real limits: there's a biggest machine you can actually buy (you eventually hit a hardware ceiling, no matter your budget), and it creates a single point of failure — if that one, now-very-expensive server crashes, the entire application goes down with it, since there's nothing else running.

Horizontal scaling: more machines, not a bigger one

Horizontal scaling means adding more servers rather than making one bigger — traffic gets spread across several machines instead of all landing on one (this is exactly what a load balancer does, covered in its own lesson). This has no hard ceiling in the same way vertical scaling does — you can generally keep adding more machines — and it removes the single-point-of-failure problem, since one server crashing doesn't take the whole system down if others are still running and can absorb its share of traffic.

The real cost: horizontal scaling requires the app to cooperate

Vertical scaling is "free" from the application's perspective — the code doesn't need to change at all. Horizontal scaling isn't: it requires the application to be able to run as multiple independent copies at once, which usually means it can't rely on storing important state only in one server's memory (a shopping cart, a logged-in session) — because the next request from that same user might land on a completely different server that has no idea about it. This is why "statelessness" comes up constantly in system design: an application designed to not depend on any single server remembering anything between requests is one that horizontal scaling actually works cleanly for.

Why real systems almost always end up doing both

Each server: reasonably powerful (some vertical scaling)
     +
Multiple servers running: 3, 10, 100+ (horizontal scaling)

In practice, "scaling" isn't a strict either/or choice — a real deployment typically runs multiple servers (horizontal), each of which is reasonably well-specced rather than the cheapest possible option (some vertical scaling too), and grows in whichever direction actually addresses the current bottleneck. If the database itself becomes the bottleneck rather than the application servers, that's a related but distinct problem — one version of it, splitting one database's data across multiple machines, is covered in its own lesson on database sharding.

The mental model worth keeping

Vertical scaling asks "can this one machine do more?" Horizontal scaling asks "can more machines share the load?" Vertical scaling is simpler and has zero architectural cost, but hits a ceiling and stays fragile (one machine, one failure point). Horizontal scaling has real architectural requirements (the app has to tolerate running as multiple copies) but scales much further and survives individual failures — which is exactly why almost every other topic in this domain (load balancing, caching, sharding, message queues) exists specifically to make horizontal scaling actually work well in practice.

Further reading

Check your understanding

A quick comprehension check — not tracked, not graded, just for you.

1. What's the main limitation of vertical scaling?

2. Why does horizontal scaling require an application to avoid storing important state in one server's memory?

3. Why do real production systems usually combine vertical and horizontal scaling rather than picking just one?

4. What removes horizontal scaling's single-point-of-failure problem that vertical scaling has?