All Questions
Llm Inference Serving hard

A chat service shows p50 TTFT of 300 ms but p99 TTFT of 8 s during peak hours. Profiling shows prefill for the p99 prompt length takes about 250 ms, and replicas report near-full KV cache occupancy at peak. What is the right first action?

  1. A Treat it as queueing: add admission control with per-tenant limits, autoscale on queue wait, and shed or defer work once wait exceeds the budget.
  2. B Switch to a smaller model to cut prefill time, since TTFT is mainly determined by model size and the 8 s tail reflects the cost of prefill.
  3. C Enable speculative decoding to shorten every request's decode phase, so running sequences finish sooner and the waiting requests start earlier.
  4. D Increase the maximum batch size so more waiting requests are admitted at once, which empties the queue and brings p99 TTFT close to the p50.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions