← Concepts
Performance·3 min read

Vertical vs Horizontal Scaling

Buy a bigger machine (simple, capped, SPOF) or add more machines (unlimited, but now you're a distributed system).

First time reading this? Start here

Plain English: vertical scaling means making one server bigger (more CPU/RAM). Horizontal scaling means adding more servers. Vertical is dead simple but hits a ceiling and is a single point of failure; horizontal scales forever but forces you to handle distribution.

Used in:Stock Exchange (Matching Engine)URL ShortenerInstagram Feed
What it is

Two ways to add capacity. Vertical scaling (scaling up) means giving a single node more resources: more CPU cores, RAM, faster disks. Horizontal scaling (scaling out) means adding more nodes and spreading load across them via a load balancer or partitioning scheme.

The problem it solves

Your service is out of capacity. Vertical scaling is the no-code answer (resize the box, done), and it's the right first move because it requires zero architectural change. But every machine has a ceiling (and the biggest boxes cost wildly more per unit). Horizontal scaling removes the ceiling entirely, at the price of making your app stateless and distribution-aware.

How it works

Vertical: stop the instance, pick a bigger instance type, restart, or hot-add resources where supported. Limited by the largest available hardware. Horizontal: run N identical stateless instances behind a load balancer; for stateful systems, shard the data across nodes (see sharding) and replicate for durability. Auto-scaling automates horizontal scaling in response to load.

Why use it
What it costs you
Where it shows up in our architectures
Gotchas

Your notes

Private to you