Zenaique

P99 TTFT spikes every Tuesday at 9am, order the triage steps

Order steps·Medium·4.0 · 0·~1 min·Asked atFlowiseGoldman SachsOpenAI
Attempt it
  • 1Compare queue depth at 9am Tuesday vs the same hour on other weekdays
  • 2Rule out upstream issues: LB latency, TLS handshake spikes, weekly cert renewal jobs
  • 3Check the autoscaler ramp curve: did replicas come up before or after the traffic surge crossed threshold?
  • 4Look at the input length distribution for Tuesday morning requests vs baseline (any 100k-token prompts?)
  • 5Inspect noisy neighbor signals on shared GPU nodes (SM util variance, KV block contention)
TL;DR

Triage cheapest signal first: queue depth and prompt-length distribution explain 80% of weekly-pattern TTFT spikes.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Picture a coffee shop that gets slammed every Tuesday at 9am. Before you tear apart the espresso machine, do the cheap checks. First, is the line at the door longer on Tuesdays? Second, is everyone suddenly ordering a 12-shot custom drink instead of a regular latte? Those two questions answer most cases. After that you can ask whether the barista was scheduled to arrive before or after the rush hit, whether someone else is using the same shared shelf for their stuff, or whether the front door's intercom is glitching. The order matters because some checks take a glance at a dashboard and others require pulling a barista off the line.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

Recurring time of week TTFT spikes are one of the most pattern-rich incidents an LLM serving team will face. The recurrence itself is a clue: anything periodic on a weekly clock is calendar-driven, which means the cause is almost certainly upstream of the model, a traffic source, a scheduled job, a business process, not a model-internal phenomenon. Engineers who reach for GPU traces and attention pattern analysis on a Tuesday-morning spike are answering the wrong question.

The right approach is cheapest signal first. Every metric on an existing dashboard costs zero engineering minutes to inspect. Every metric that requires instrumenting a new collector, sshing into a node, or capturing a GPU trace costs hours. The triage tree orders checks so that the highest signal per minute investigations come first. Two of those checks, queue depth and input-length distribution, resolve roughly 80% of weekly-pattern TTFT incidents in production environments. The remaining three exist for the harder cases where the obvious causes come back clean.

This deep dive walks each step in order, explains what the signal looks like when it is the cause, and shows how to instrument so that next time's triage is faster. The framework generalizes to any periodic latency pattern, not just TTFT and not just LLMs, the bones of it are SRE 101 with model-serving specifics filled in.

Step 1: queue depth, the cheapest decisive signal

Queue depth, the number of admitted requests waiting for a serving slot, is the metric that captures the imbalance between traffic and capacity. Modern serving stacks (vLLM, SGLang, TGI, TensorRT-LLM) expose it on the /metrics Prometheus endpoint by default, usually as vllm:num_requests_waiting or equivalent. Most teams already graph it.

If queue depth at 9am Tuesday is materially higher than at 9am Monday or Wednesday, the diagnosis is capacity: the system has insufficient replicas to absorb the instantaneous demand. The downstream effect on TTFT is direct, a request that waits 4 seconds in queue carries that 4 seconds into its TTFT, regardless of how fast the model itself runs. P99 TTFT is then dominated by queueing time, not by model time.

The fix is either to add replicas during the known peak window (scheduled pre-scaling) or to move the autoscaler to a leading signal so it reacts faster (see step 3). The fix is not to optimize the model further, model optimizations cut model time, which is not the binding constraint here.

If queue depth is flat across days but TTFT still spikes, you have ruled out the most common cause. Proceed to step 2.

Step 2: input-length distribution, the second most common cause
Step 3: autoscaler ramp curve
Steps 4-5: noisy neighbors and upstream network
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • vLLM and SGLang expose queue depth and waiting-request count on their /metrics endpoints, intended for autoscaler signals and exactly this kind of triage.
  • Anthropic's, OpenAI's, and Together AI's status pages frequently note input length driven spikes around scheduled customer batch jobs.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QHow would you instrument to make this triage faster next time?
A

Dashboard panels for queue depth, P99 input-length, replica count, all overlaid on the same time axis. Slack alert that compares each hour's metrics to the same hour of week. Pre-scale schedule for known business-hours peaks based on the past month's distribution.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Jumping to the model itself or to GPU-level traces before checking queue depth and prompt-length distribution. Recurring time of week spikes are almost always a traffic-shape or autoscaler problem, not a model problem.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • Why queue depth is the cheapest TTFT-spike signal

  • How input-length distribution dominates prefill time and TTFT tails

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Which events must every agent execution trace capture to enable debugging of production failures?
Multi-select·Medium