Repaso
EspaƱol
System DesignCoreSD-01

Horizontal vs vertical scaling?

Options

  1. Horizontal: a bigger machine; vertical: more machines
  2. Horizontal: more machines; vertical: a bigger one (Correct option)
  3. They are the same thing under two different names
  4. Vertical scaling needs a load balancer to work

Answer

Horizontal: add more machines; vertical: add CPU/RAM to one machine

Why

Vertical scaling (scale up): give one server more CPU, RAM or disk. Simple, no code changes, but there is a maximum size and that one server is still a single point of failure.

Horizontal scaling (scale out): add more servers and spread the traffic with a load balancer. It can grow much further and survives a server dying, but the app must be designed for it (e.g. stateless servers).

Remember

Vertical = bigger machine. Horizontal = more machines.

Key terms

Practice this question in Repaso