TTFT: name the metric it captures and what dominates it
TTFT is the wall-clock latency from request submit to first generated token; it is dominated by queue time and prefill, not decode.
Imagine you walked up to a coffee counter and shouted your whole order in one breath. The barista has to listen to every word before she can hand you the first sip. That listening time is the prefill phase, and the wait in line behind other customers is the queue. Picture how long it takes the first drop of coffee to reach your hand: that is TTFT. Whether the rest of the cup fills fast or slow does not change that first-drop moment. Chat apps feel snappy or sluggish almost entirely on that first-drop number, which is why product teams obsess over it more than total cups per minute.
Detailed answer & concept explanation~4 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: definition + prefill vs decode split + why product cares about TTFT separately + caching and disaggregation as the two big levers + queue depth as the real p95 villain.
Real products, models, and research that use this idea.
- Anthropic's Messages API emits a `message_start` SSE event marking exactly when TTFT ends; teams use it to set per-region SLOs on Claude Sonnet 4.6.
- OpenAI's GPT-5.5 streaming endpoint reports TTFT separately in its server logs, and product teams alert on p95 TTFT independent of total tokens emitted.
- vLLM v1 and SGLang publish p50/p95/p99 TTFT in their benchmark scripts, separating queue from prefill so operators can tune batch admission policies.
- Llama 4 Maverick deployments on H100 fleets use chunked prefill and prefix caching to keep p95 TTFT under one second for long-context chat workloads.
- Gemini 3.1 Pro exposes streaming chunks the same way; latency dashboards for Google's AI Studio chart TTFT alongside completion-tokens per second.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you reduce p95 TTFT on a long-context chat product without dropping throughput?
QWhy does speculative decoding help TPOT but not TTFT?
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.
Claiming TTFT depends on output length. It does not. TTFT is paid before decode begins, and longer outputs only inflate TPOT and total time.
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.