Skip to content
BENIBIX Learn

Horizontal Scaling

Development🏗️ ArchitectureScaling

Also known as Scaling Out, Scale Out

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

Think of it like

Think of it like opening more checkout lanes at a busy shop. Each lane takes some of the line.

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.

Definition

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.

Common mistake

Keeping user logins on one server. If the next request goes to another server, the user is logged out.

Key takeaways

  1. 1
    More machines. Each runs a copy.
  2. 2
    Spread the load. With a load balancer.
  3. 3
    No state on one box. Any machine can answer.

Compare