LESSON 05 · Sensitivity and headroom

Use the estimate to make one decision

Test which assumption changes the architecture, then validate it with real load.

SYSTEM VIEW

The calculation

Diagram view
Swipe or scroll to explore the full diagram
Capacity math changes the deployment choiceAt a peak of 1,200 requests per second and 210 usable requests per second per instance, six healthy instances are needed. A seventh provides room for one instance to fail.Capacity math changes the deployment choice1,200 peak req/sexpected busy load÷ 210 req/s300 measured × 70%6 healthyround 5.72 upward+ 1 sparesurvive one failure7 deployedverify in a load testChange the peak or safe utilization and recalculate before committing.
At a peak of 1,200 requests per second and 210 usable requests per second per instance, six healthy instances are needed. A seventh provides room for one instance to fail.
Follow the units from assumptions to a capacity decision.

Estimate it on paper, then check

Estimation is the one design skill a machine can honestly check. Each drill has new numbers. Work it out with units before you answer: rough is fine, and you’ll be told how rough.

20 million people use an app each day and each makes 4 requests. Traffic peaks at 3 times the daily average. What is the peak request rate?

THE IDEA

How it works

An estimate earns its keep when it settles a decision. Suppose a web instance sustains 300 requests per second in a representative load test. A 1,200-request-per-second peak needs four instances only if all four run at their limit. With a target of at most 70% utilization, the share of capacity in use, each contributes about 210 requests per second: 1,200 ÷ 210 ≈ 5.7, so the first estimate is six healthy instances.

Now add failure. If one of six dies, the other five each carry 240 requests per second, which is 80% utilization: above target, though still below the tested limit. A seventh instance, often called N+1 capacity, keeps the fleet at target during a failure. Whether that is worth paying for depends on how the service behaves at 80%, which only a test shows.

Then change one assumption at a time: daily activity, peak multiplier, object size, or retention. Doubling the peak to 2,400 requests per second moves the count from 6 to 12 instances, more of the same, with no redesign. Changing posts from text to video changes storage, upload paths, and processing. If doubling one input changes the component choice, that input deserves measurement.

Round estimates enough to compare options, then replace guesses with traffic data, load tests using tools such as k6 or Locust, and a clear capacity trigger. A load test takes time and misleads if its data or traffic mix is unrealistic. If a wrong guess is cheap to reverse, as with adding a web instance, skip the analysis and watch the metrics.

DECISION POINT

A proposed design works only if peak traffic is less than twice the average, but nobody has measured peaks. What should the team do?

Write a sentence or two to unlock the guidance. Committing first is what makes it stick.

Keep in mind

  • Headroom and failure targets change the required instance count.
  • An estimate is useful when it guides a choice and identifies what to measure next.
CHECK YOUR UNDERSTANDING

Put it into practice.

1 OF 2
ApplyQUESTION 01

Peak load is 2,000 requests/s. Each instance sustains 500 requests/s, but target utilization is 60%. What is the first healthy-instance estimate?

Choose an answer. You’ll see the explanation once you get it right.

0 of 2 checkpoints answered correctly to complete this lesson.