Filters
How to search
  • Plain words find names, texts and examples.
  • "two words" finds the exact phrase.
  • --name or -x finds an option.
  • #word looks only inside commands.
  • @grep finds lessons and labs that use grep.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Put ! before a word to leave it out. OR between words means one of them.
  • ↑ ↓ to move · Enter to open · Esc to close · / to search

DevOps basicsIT series

Horizontal vs Vertical scaling

When a system is overloaded, there are two ways to give it more capacity: make the machine bigger, or add more machines. Each fits a different problem.

Quick reference

VERTICALHORIZONTAL
HowUpgrade the machineAdd more machines
LimitThe biggest boxAlmost none
DowntimeOften a rebootNone, add live
RedundancyStill one machineSurvives one failing
NeedsSimpleLoad balancer, stateless app
Best forDatabases, quick winsWeb and app tiers

VERTICAL (A bigger box): Give the existing server more CPU, memory or disk.

Example: 2 vCPU -> 8 vCPU

HORIZONTAL (More boxes): Add more servers and spread the load across them.

Example: 1 server -> 5 servers

  • Vertical → fast and simple, until you hit the ceiling.
  • Horizontal → scales far and survives failures. Design for it.

Explained

Vertical scaling means giving the existing server more resources: more CPU, more memory, a faster disk. 2 vCPUs become 8. It is the simplest option, needs no change to your application, and is often the fastest fix. The limits are real, though. There is a biggest box you can buy, it is still a single point of failure, and resizing usually means a reboot and a moment of downtime.

Horizontal scaling means adding more servers and spreading the load across them with a load balancer. One app server becomes five. There is almost no ceiling, you can add or remove capacity while the system is live, and if one server dies the others carry on. The cost is design: your app must be stateless, or keep its state in a shared database or cache, so any server can handle any request.

How to choose

Vertical: a database, or a quick win under sudden load. Simple, but temporary. Horizontal: web and application tiers, where you need to scale far and survive failures. The cloud-native default.

A common pattern combines them: scale the stateless web and app tiers horizontally behind a load balancer, and scale the database vertically, because databases are harder to spread across machines.

The deeper point: horizontal scaling is as much an application design decision as an infrastructure one. Build stateless, and scaling out becomes easy later.

Vertical is fast. Horizontal goes far.

More notes: DevOps basics

Open in the notes app: search, filters, copy This note on GitHub