A chatbot team reports TTFT P99 jumped from 300ms to 1.4s overnight. Which root cause is most likely?
TTFT, TPOT, and throughput pull against each other; a sudden TTFT spike points at queue wait or prefill, not at per-token decode speed or matmul throughput.
Think of a busy coffee shop. TTFT is how long until the barista starts making your drink. TPOT is how fast each sip-sized step of your drink gets made. Throughput is how many drinks the whole shop finishes per hour. If you batch more customers together, the shop finishes more drinks per hour, but any one person waits longer to even get started and feels slower sip to sip. So a sudden jump in how long until your drink is started usually means the line got longer or your order got bigger, not that the barista's hands slowed down. You pick which number to protect based on whether customers care most about waiting, sipping, or total shop output.
Detailed answer & concept explanation~7 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: define TTFT, TPOT, throughput + the batching tradeoff + decompose TTFT into queue plus prefill + why the distractors confuse metrics + which metric a product should protect.
Real products, models, and research that use this idea.
- vLLM exposes TTFT and inter-token latency as separate Prometheus metrics so teams can set an SLO on each one independently rather than one blended latency.
- NVIDIA TensorRT-LLM uses chunked prefill so a long incoming prompt does not block ongoing decode streams, protecting TPOT while keeping throughput high.
- Anthropic and OpenAI ship streaming chat APIs where TTFT is the user-felt responsiveness metric for Claude Opus 4.7 and GPT-5.5, while their batch APIs optimize pure throughput at relaxed TTFT.
- SGLang's continuous batching scheduler admits requests at the token level so queue wait stays low even as concurrency rises, holding P99 TTFT down.
- Together AI and Fireworks expose per-endpoint TTFT and tokens-per-second dashboards so customers pick a serving tier by the metric their product needs.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy does increasing batch size raise throughput but worsen TTFT and TPOT for individual requests?
QHow does chunked prefill change the TTFT versus TPOT tradeoff?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Treating TTFT, TPOT, and throughput as one latency number. They trade off against each other, so a regression in one says nothing reliable about the others without a trace.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.