Inference, Serving & Production·Question 40 of 76Advanced

Capacity planning: you're told to expect 100 requests/sec at peak with ~2K input and ~300 output tokens per request. Walk me through estimating the GPU fleet.

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

Method first, numbers second - interviewers are grading the process.

Full worked answer

Method first, numbers second - interviewers are grading the process.

1. Characterise demand. Peak 100 req/s × 2K in / 300 out ⇒ ~200K input tok/s prefill and ~30K output tok/s decode, sustained. Check the distribution too: means hide the 32K-token document uploads that dominate tail behaviour. Apply expected prompt-cache hit rate (shared system prompt across requests can cut effective prefill dramatically).

2. Measure per-replica goodput - don't trust datasheets. Take the target model/engine/GPU config (say 70B FP8, TP=2 on H100s), load-test with production-shaped traffic (same in/out lengths, arrival bursts), sweep concurrency, and find max throughput under your SLO (goodput) - e.g., you might measure a replica sustaining ~X thousand output tok/s with P99 TTFT under budget. Sanity-check X from first principles: decode is bandwidth-bound, so bytes-per-token × tokens/s must fit within aggregate HBM bandwidth; if your measurement is way off the roofline estimate, something's misconfigured.

3. Divide with headroom. replicas = peak_demand / per_replica_goodput × headroom - headroom ~1.4-1.7× because queueing latency explodes near saturation (target ~60-70% utilization at peak), plus N+1 for failure/deploys, plus multi-zone if required. Diurnal shape decides how much is reserved/committed capacity vs autoscaled.

4. Don't forget the non-GPU parts: gateway, tokenization, KV transfer if disaggregated - and that prefill and decode demand may justify different pool shapes.

5. Validate and iterate: shadow traffic or gradual rollout, watch goodput/queue depth/KV utilization, re-plan monthly - traffic mix drift (longer contexts, agentic loops) invalidates plans faster than growth does.

The trap to avoid: quoting a tokens/s number from a blog benchmark run with 128-token prompts and calling it a plan. Also state the alternative: at this scale, compare against API provisioned-throughput pricing - the fleet you just sized has a fully-loaded cost that may or may not beat it.

What a good answer covers

  • Peak 100 req/s × 2K in / 300 out ⇒ ~200K input tok/s prefill and ~30K output tok/s decode, sustained
  • Check the distribution too: means hide the 32K-token document uploads that dominate tail behaviour
  • Apply expected prompt-cache hit rate (shared system prompt across requests can cut effective prefill…
  • Measure per-replica goodput - don't trust datasheets
  • Take the target model/engine/GPU config (say 70B FP8, TP=2 on H100s), load-test with production-shaped…

Key terms: 1. Characterise demand · 3. Divide with headroom · 5. Validate and iterate

Interviewer follow-ups to expect

  1. How does a 30% prompt-cache hit rate change the answer?

  2. Peak is 3× the daily average - how do you split reserved vs autoscaled capacity?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep