End-to-end latency: fill in the queue, prefill and decode components.
End-to-end latency decomposes into queue_time + TTFT + (N_out - 1) * TPOT, where TTFT is compute-bound prefill and TPOT is bandwidth-bound decode.
Picture sending a package through a busy mailroom. First it sits in line behind other packages: that is queue time. Then a clerk has to read the whole address (the entire prompt) before anything can move: that is TTFT, paid once. After that, the clerk hand-writes one stamp at a time onto the box, again and again, until it is fully labeled. Each stamp is the same small wait, but you pay it once per stamp. If the package needs hundreds of stamps, that second pile of waits ends up much bigger than the one-time address-reading. End-to-end latency is the sum of all three pieces.
Detailed answer & concept explanation~5 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: three-term decomposition + prefill compute-bound vs decode bandwidth-bound + decode dominates for N_out > 50 + production levers for each term + why TTFT and TPOT need separate SLOs.
Real products, models, and research that use this idea.
- vLLM v1's benchmark scripts report p50/p95/p99 for both TTFT and inter-token latency (effective TPOT) separately, plus queue depth.
- Anthropic Claude Sonnet 4.6 dashboards alert on TTFT and total completion time as separate SLOs; long-context chat targets p95 TTFT under one second.
- GPT-5.5 streaming endpoints surface TTFT via the first SSE delta timestamp; product teams chart it independent of total tokens emitted.
- Llama 4 Maverick deployments on H100 fleets report TPOT around 25-40ms per token and TTFT around 500ms-1s at 4K context, depending on batch size.
- DeepSeek V4 with speculative decoding shows TPOT compressed by 1.8-2.2x in published vLLM benchmarks while TTFT is unchanged.
What an interviewer would ask next. Try answering before peeking at the approach.
QIf TTFT = 200ms and TPOT = 30ms, what is the breakeven output length where decode equals prefill?
QHow does prefill-decode disaggregation in vLLM v1 change the latency decomposition?
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.
Lumping TTFT and per-token decode into one latency number. They move on different axes and need separate SLOs because prefill is compute-bound while decode is bandwidth-bound.
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.