Tech_Interview_Prep

Capacity Planning & Load Testing

Knowing how much traffic a system can take before it does, through modeling and deliberate load testing.

What it is

Capacity planning forecasts future resource needs based on growth trends; load testing validates a system's actual behavior under stress before real traffic finds its limits.

Key points

  • Load testing applies expected (or higher) traffic in a controlled environment to find bottlenecks — the goal is finding the breaking point on your own terms, not in production during a traffic spike.
  • Stress testing pushes past expected load specifically to see how the system fails — gracefully (shedding load, degrading a feature) or catastrophically (cascading failure) — which matters as much as when it fails.
  • Headroom: capacity planning targets some buffer above forecasted peak, not exactly-100%-utilized infrastructure, since real traffic has spikes that projections smooth over.
  • Bottlenecks are rarely uniform — a system is often limited by one specific resource (a database connection pool, a downstream API's rate limit) well before others are anywhere near saturated.