Skip to main content
foundations

Scalability — horizontal vs vertical

9 min read
Fully authored

Two ways to add capacity, and why one usually wins at scale.

You need more capacity. Two directions to go: up (bigger box) or out (more boxes). The choice cascades through your whole architecture.

Trade-off matrix

DimensionVerticalHorizontal
ComplexityZeroLoad balancer, service discovery, stateless design
CeilingHardware max (~192 cores today)Effectively unlimited
Cost curveSuper-linear ($10k → $200k per box)Linear ($100/box × N)
Fault toleranceSingle point of failureN-1 tolerance built in
Deploy riskBigger blast radius (whole box down)Rolling deploys, no downtime
Best forDatabases (writes), monoliths, legacyWeb tier, workers, stateless microservices

The senior insight — do both, in the right order

MVP: run monolith on the biggest machine you can afford (vertical). Scale writes are hard. When you hit ceiling: split OFF stateless components + scale them horizontally. Database stays vertical much longer. Sharding is the LAST resort — it changes your data model forever.

Practice what you just read

Every foundation concept has a companion quiz to close the loop.