The interview problem

Practice prompt

Design a forecasting layer that prepares capacity before a service load spike, with a reactive fallback.

Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.

1. Scope and worked approach

Forecast demand over provisioning lead time using calendar and lagged metrics available now. Convert demand quantiles into capacity using measured per-instance throughput, then apply minimums, maximums and cooldowns. Compare with a seasonal baseline and retain reactive scaling.

2. Trace the design or derivation

Demand history
  → lead-time forecast
  → capacity conversion
  → constrained scale plan
  → feedback

Separate forecasting error from a wrong service-rate model. Track queueing, rejected requests and startup failures so low served throughput is not mistaken for low demand. Use a dry-run controller before letting predictions change production capacity.

3. Calculate the example

A forecast of 9,000 requests/s and safe capacity 500 requests/s per instance implies 18 instances before reserve. A 20% reserve gives 21.6, rounded up to 22; this assumes the throughput measurement remains valid.

4. Failure cases and trade-offs

A sudden campaign can exceed historical patterns. Forecasting observed served traffic under saturation underestimates unmet demand. Aggressive scale-down can undo proactive scale-up.

5. Validation, follow-ups and self-review

Replay historical provisioning delays and measure SLO misses plus instance-hours. Follow-up: how do quotas alter the plan? Self-review: include lead time, capacity assumptions and fallback.

Sources and related practice

Technical reference: kubernetes.io — Reactive autoscaling constraints; predictive layer is an original proposed design.

Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.

Continue with Design a demand forecasting system; Investigate an AI customer’s capacity and cost problem.

Continue your preparation

Choose a connected learning path or browse more ML system design questions. Read our editorial method and attribution policy.