Vertical Scaling vs Horizontal Scaling — Explained Simply
Every system eventually becomes slow.
Vertical Scaling vs Horizontal Scaling — Explained Simply
Every system eventually becomes slow.
Maybe:
- CPU becomes full
- memory usage spikes
- database queries slow down
- disk I/O becomes high
- network bandwidth gets exhausted
This limiting factor is called a bottleneck.
Scaling starts with identifying:
“What is actually saturated?”
Because scaling the wrong thing only increases cost without improving throughput.
Common bottlenecks:
- CPU
- memory
- disk I/O
- network
- database locks
- GPU memory
- shared dependencies
Once the bottleneck is identified, there are two ways to add capacity:
- Vertical Scaling
- Horizontal Scaling
Vertical Scaling (Scaling Up)
Vertical scaling means:
Give an existing machine more resources.
That machine can be:
- a server
- cloud VM
- database instance
- Kubernetes pod
- cache node
- GPU worker
The system shape mostly stays the same. The machine simply becomes more powerful.
Example:
Before:
8 vCPU
32 GB RAM
standard disk
After:
32 vCPU
256 GB RAM
faster storage
Same application. Same node. Bigger resource envelope.
Where Vertical Scaling Helps
Vertical scaling works well when:
- CPU is saturated
- memory is insufficient
- hot data no longer fits in RAM
- disk I/O becomes slow
- GPU memory becomes a constraint
Example: A PostgreSQL database becomes slow because indexes no longer fit in memory. Increasing RAM can reduce disk reads and improve latency immediately.
A write-heavy database may benefit from:
- faster NVMe storage
- higher IOPS
- larger memory
An inference service may move to a larger GPU instance because the model no longer fits comfortably in memory.
Why Teams Prefer Vertical Scaling First
The biggest advantage is simplicity.
You avoid:
- sharding
- distributed coordination
- replica management
- request routing complexity
Data locality is also better because:
- CPU
- memory
- storage
stay close together.
This matters a lot for:
- databases
- caches
- search systems
- in-memory analytics
Vertical scaling is often the first practical move because it avoids redesigning the application.
Problems with Vertical Scaling
Hard Ceiling
Every platform has a largest practical machine size.
Eventually:
- the next machine becomes too expensive
- or does not exist
Single Failure Domain
If one large machine owns the workload, it remains a major failure point.
Expensive at Large Scale
Costs increase heavily for:
- high-memory machines
- GPU instances
- provisioned I/O
- very large instances
Does Not Solve Every Bottleneck
More CPU will not fix:
- bad indexes
- slow APIs
- lock contention
- serialized code paths
Vertical scaling helps only when the bottleneck is local to that machine.
Horizontal Scaling (Scaling Out)
Horizontal scaling means:
Add more machines and spread the workload
For APIs:
- add more application instances behind a load balancer
For workers:
- add more queue consumers
For storage:
- add replicas, partitions, or shards
Example
Instead of:
1 application server
Run:
10 application servers
behind a load balancer.
Clients
↓
Load Balancer
↓ ↓ ↓
S1 S2 S3
Each node handles part of the traffic.
Where Horizontal Scaling Works Best
Horizontal scaling works best when work can run independently.
Good examples:
- stateless APIs
- background workers
- queue consumers
- microservices
Any node can handle any request.
Shared state usually lives outside the instance:
- database
- cache
- object store
Advantages of Horizontal Scaling
Higher Capacity Ceiling
You can continue adding nodes as traffic grows.
Better Availability
If one node fails, others continue serving traffic.
Elastic Scaling
Cloud platforms can automatically:
- add replicas during spikes
- reduce replicas during low traffic
Better Failure Isolation
Failure impact stays limited to smaller units.
Geographic Distribution
Services can run closer to users across multiple regions.
Problems with Horizontal Scaling
Horizontal scaling introduces distributed systems complexity.
Now the system must handle:
- retries
- partial failures
- synchronization
- load balancing
- replica lag
- deployment coordination
- observability across nodes
Shared dependencies also become new bottlenecks.
Example: If a database handles only 20k writes/sec, adding 50 more API servers may only overload the database faster.
More servers do not automatically mean infinite scalability.
Scaling Depends on the Layer
Different components scale differently.
Stateless APIs scale horizontally very well.
Databases are harder.
Read replicas help reads, but writes often require:
- partitioning
- sharding
- stronger coordination
Caches also scale horizontally, but hot keys can still overload one node.
Inference systems may scale:
- horizontally for throughput
- vertically for GPU memory requirements
This is why:
“Just scale horizontally”
is incomplete advice.
Often:
- web tier scales easily
- database becomes bottleneck
- GPU inference becomes bottleneck
- embedding pipeline becomes bottleneck
When to Choose Vertical Scaling
Vertical scaling is usually a good first move when:
- the bottleneck is local to one machine
- workload is stateful
- traffic does not justify distributed complexity
- the working set almost fits into memory
It is also useful for:
- monoliths
- legacy systems
- tightly coupled applications
where distributing the workload is difficult.
When to Choose Horizontal Scaling
Horizontal scaling becomes important when:
- traffic grows rapidly
- availability matters
- workloads are naturally parallel
- requests can run independently
- one machine is near practical limit
It is especially effective for:
- APIs
- queue workers
- stateless services
Example: An API service becomes CPU-bound during peak traffic, while the database still has headroom. Adding more API replicas behind a load balancer becomes the natural solution.
Most Production Systems Use Both
Real systems rarely use only one strategy.
Common pattern:
- APIs scale horizontally
- databases scale vertically first
- read replicas scale horizontally
- workers scale horizontally
- GPU nodes may scale both ways
The goal is not:
“Scale everything.”
The real goal is:
“Find the actual bottleneck and scale the correct layer with manageable operational complexity.”
메타데이터
- post_id
- 6ee44fc666e6
- slug
- vertical-scaling-vs-horizontal-scaling-explained-simply-6ee44fc666e6
- url
- https://medium.com/@ak67373/vertical-scaling-vs-horizontal-scaling-explained-simply-6ee44fc666e6
- canonical_url
- https://medium.com/@ak67373/vertical-scaling-vs-horizontal-scaling-explained-simply-6ee44fc666e6
- author_url
- https://medium.com/@ak67373
- status
- ok
- fetched_at
- 2026-06-09 15:37:30