Horizontal vs Vertical Scaling
Growing capacity by upgrading a single machine vs distributing load across a fleet
Difficulty: Beginner · Read time: 7 min · Access: Free Interactive Lesson
How It Works
As user traffic grows, a single server eventually saturates its Central Processing Unit (CPU), Random-Access Memory (RAM), disk Input/Output (I/O), or network bandwidth. Vertical scaling (scaling up) upgrades one machine to beefier hardware, whereas horizontal scaling (scaling out) adds more commodity machines behind a Load Balancer (LB). Horizontal scaling requires stateless application tiers so any node can serve any request without relying on local memory.
Why It Matters
Vertical scaling hits a hard physical and economic ceiling—top-tier hardware costs grow exponentially—and leaves you exposed to a Single Point of Failure (SPOF). Modern cloud systems scale horizontally with stateless servers so capacity grows elastically with traffic and survives individual machine crashes.
Interactive Architecture Scenarios
- Horizontal Scaling (Scale Out)
- Vertical Scaling (Scale Up)
Key Terms & Short Forms
- CPU / vCPU (Central Processing Unit / Virtual CPU): Core compute unit executing application logic; a vCPU represents a thread of a physical core allocated to a cloud virtual machine.
- RAM (Random-Access Memory): Fast volatile system memory holding active code, buffers, and in-process caches.
- I/O (Input/Output): Data movement between CPU/RAM and external subsystems such as Solid-State Drives (SSDs) or network cards.
- SPOF (Single Point of Failure): Any single component whose crash brings down the entire system because no redundant backup can take over.
- RPS (Requests Per Second): Measure of incoming request rate arriving at a service or load balancer.
- JWT (JSON Web Token): Cryptographically signed stateless token carried by clients so any server can verify identity without local session storage.
- LB (Load Balancer): Reverse proxy that distributes incoming network traffic across healthy backend nodes and removes crashed servers via health checks.