Home/Labs/Scale-Up vs Scale-Out Physics
All 280 Labs
INTERACTIVE LAB📈

Vertical vs Horizontal Scaling Lab (Interactive)

Drag core counts and fleet size to watch Amdahl's Law flatten throughput while cloud pricing turns exponential. Compare a 448-core mega-node against a commodity fleet on throughput, monthly cost, crash blast radius, and dollars per thousand QPS.

Scale-Up vs Scale-Out Physics Lab

Watch Amdahl's Law flatten vertical throughput while cloud price curves turn exponential.

Delivered throughput15,894 QPS
vs no Amdahl loss: 96,000
Monthly cost$5,475
$344 / kQPS·mo
Core efficiency17% of linear
Amdahl: S(N)=1/(s+(1−s)/N)
1-node crash blast radius100% down
SPOF: kernel panic = total outage
A 64-core node plateaus at ~15,894 QPS by Amdahl's Law — demand unmet.
💡 Cheapest strategy that still covers demand: Horizontal (scale-out) — vertical has a hard ceiling. A $0.34/hr c6i.2xlarge fleet scales linearly; a u-24tb1.112xlarge costs $100k+/mo — a 400× price jump for non-linear throughput.

How It Works Under the Hood

Vertical scaling collides with physics: beyond a few dozen cores, NUMA cross-socket latency (60 ns local vs 140-200 ns remote), cache-coherency traffic, and lock contention cap speedup at 1/(S+(1-S)/N). Cloud pricing compounds the problem — a u-24tb1.112xlarge costs over $100k/month for throughput a hundred c6i.2xlarge nodes deliver linearly. Horizontal scale-out restores linearity but demands stateless services and an externalized state tier.

Core Architectural Principles

  • Amdahl's Law speedup(N) = 1/(S + (1-S)/N) plateaus single-node throughput regardless of core count.
  • Vertical instances follow an exponential price curve while commodity nodes cost linearly per box.
  • A fleet behind an L4/L7 balancer shrinks crash blast radius to 1/N and enables rolling deploys.
Interview Round Script

Lead with the rule of thumb: scale application tiers horizontally, scale databases vertically first with read replicas, then shard when write IOPS saturate. When asked why 128 cores are not 128x faster, cite NUMA boundaries, MESI cache-coherency traffic, and Amdahl's sequential fraction to show systems depth.

Key Trade-Offs

Vertical keeps trivial in-process consistency but is a single point of failure with an exponential cost wall; horizontal buys elasticity and fault tolerance at the price of mandatory statelessness and per-hop network latency.

Related Curriculum Chapter

Vertical vs Horizontal Scaling: The Cost & Physics Curve

Read Full Chapter Blueprint

Explore More Interactive Labs

View All 280 Labs