Academy · Fundamentals

Vertical vs horizontal scaling

Your one server is maxed out. Do you buy a bigger one, or buy more of them?

2 min read·8 sections
Open the interactive version → diagrams, practice & more

The problem

Your one server is maxed out. Do you buy a bigger one, or buy more of them?

The idea

Vertical = a bigger machine (more CPU/RAM). Horizontal = more machines working together.

How it works

Vertical is simplest — no code changes — but hits a hardware ceiling, costs super-linearly at the high end, and stays a single point of failure. Horizontal scales near-limitlessly but the Universal Scalability Law warns the gains aren't free: each node adds coordination and data-coherency cost, so throughput can plateau or even decline past a point if contention dominates.

The tradeoff

Vertical: simple, bounded, fragile, pricey at the top. Horizontal: elastic and resilient but demands load balancing, a stateless app tier, and a real story for shared state and consistency. Most systems go vertical first (cheapest path) and horizontal when they need either the scale or the high availability one box can never give.

In the wild

You start on one box (vertical), then add a load balancer + many app servers (horizontal) as you grow.

Deep dive

Flow

  1. Start vertical: upgrade the box until cost or ceiling bites.
  2. Make the app tier stateless so it can replicate.
  3. Add a load balancer and a fleet of identical nodes.
  4. Push shared state into caches/DBs; plan for consistency.

Watch for

  • One big box is a single failure from total outage, regardless of size.
  • Scaling isn't linear — coordination cost can flatten gains (USL).
  • Horizontal scaling just relocates the bottleneck to shared state.

Common trap

Say why you scale horizontally — availability often matters more than raw capacity.

Common questions

What problem does Vertical vs horizontal scaling solve?

Your one server is maxed out. Do you buy a bigger one, or buy more of them?

How does Vertical vs horizontal scaling work?

Vertical is simplest — no code changes — but hits a hardware ceiling, costs super-linearly at the high end, and stays a single point of failure. Horizontal scales near-limitlessly but the Universal Scalability Law warns the gains aren't free: each node adds coordination and…

What are the tradeoffs of Vertical vs horizontal scaling?

Vertical: simple, bounded, fragile, pricey at the top. Horizontal: elastic and resilient but demands load balancing, a stateless app tier, and a real story for shared state and consistency. Most systems go vertical first (cheapest path) and horizontal when they need either the…

Where is Vertical vs horizontal scaling used in production?

You start on one box (vertical), then add a load balancer + many app servers (horizontal) as you grow.

Part of Academy on SystemLore — system design explained with 148 deep topics, interactive diagrams, and a build-it-yourself game. Browse the glossary and "X vs Y" comparisons, or build this one →