Skip to content
BENIBIX Learn

Horizontal vs Vertical Scaling

Horizontal and vertical scaling are both ways to handle more work, but they grow in two different ways. Vertical scaling makes one machine bigger, with more cores and memory. Horizontal scaling adds more machines that share the load. Going up is easy but has a ceiling. Going out has no ceiling, but the app must be built for it.

Development🏗️ Architecture

Horizontal Scaling

Handling more work by adding more machines that share the load.

Horizontal scaling means handling more work by adding more machines. Each machine runs a copy of the app, and a load balancer spreads the requests among them. There is no hard upper limit: you keep adding machines. If one machine dies, the others carry on. The app must be built for it, though, with no user data kept on a single machine.

Example
Jack's API runs on 2 servers. Before a big sale he adds 8 more, and the load balancer sends each one a tenth of the traffic.
Why it matters
It is how big websites serve millions of people. It also means one broken machine does not take the site down.
Full entry
Development🏗️ Architecture

Vertical Scaling

Make one machine bigger to handle more work.

Vertical scaling means handling more work by giving one machine more power. You add CPU cores, memory or faster disks to the server you already have. The app does not need to change at all, which makes it the easiest first step. But every machine has a top size, and bigger machines cost a lot more. If that one machine fails, everything stops.

Example
Emma's database server has 4 CPU cores and 16 GB of memory and is struggling. She moves it to 16 cores and 64 GB, and it keeps up again.
Why it matters
It is often the cheapest fix in time, because no code changes. Many apps run happily on one strong machine.
Full entry

In one line

Horizontal Scaling
Handling more work by adding more machines that share the load.
Vertical Scaling
Make one machine bigger to handle more work.