LLM Service Outages: Troubleshooting and Architecture Resilience for Peak Traffic
This article examines a typical intermittent outage of an online large language model (LLM) service and explains how to troubleshoot it and design for resilience. It breaks user impact into measurable metrics such as time to first token, tokens per second, and request success and timeout rates, then traces common root causes across capacity, scheduling, traffic, and dependency layers. It covers observability baselines, capacity and elasticity planning, traffic governance and fallback, reducing reliance on a single endpoint, and a post-incident checklist to turn one failure into a durable asset.
1. What Happened: A Typical Intermittent Inference Outage
In a widely discussed production incident, an online LLM service began to degrade in the early evening. First, the web interface took a long time to return the first token, and API-based calls soon stalled at the same stage. The service briefly recovered once, but only for a minute or two before failing again. After roughly an hour it came back fully, though output speed remained noticeably slow. This kind of “flapping” failure is harder to handle than a complete outage, because it triggers both user retries and client timeouts at the same time, creating a secondary amplification effect.
From an engineering perspective, user-perceived impact should be broken down into three quantifiable metrics:
- Time To First Token (TTFT): reflects whether queuing and scheduling are healthy;
- Tokens Per Second: reflects whether batch size and GPU memory bandwidth are saturated;
- Request success rate and timeout rate: reflect overall availability of the request path and the intensity of any retry storm.
When all three degrade together, it usually points to compute resources on the server side being overwhelmed by a sudden peak, rather than an isolated network problem.
2. Root Cause Hypotheses: Why Peak Hours Are the Most Fragile
Online LLM inference differs significantly from a conventional stateless web service. Its bottleneck is concentrated in GPU memory and scheduling rather than CPU. Common triggers fall into four layers:
- Capacity layer: GPU memory is a hard constraint. As context length grows, key-value (KV) cache usage rises linearly, and once it exceeds the reserved amount, new requests can only queue or be rejected.
- Scheduling layer: continuous batching must trade off throughput against latency. Larger batches yield higher throughput but worse TTFT for individual requests; if the policy favors throughput during peak hours, users will feel the service is “stuck.”
- Traffic layer: default unlimited client retries with no backoff jitter can amplify a local congestion event into a global avalanche.
- Dependency layer: side-path services such as authentication, quota metering, logging, and auditing can drag down the main path if they block synchronously.
When troubleshooting, verify segment by segment in the order “ingress → gateway and rate limiting → scheduling queue → inference execution → side dependencies.” First determine whether the problem is queuing or execution, and avoid blindly scaling out.
3. Observability First: Establish a Baseline Before Diagnosis
Without a baseline, you cannot tell whether “slow” is abnormal. At minimum, collect the following four categories of data and unify them into your logging and monitoring/alerting systems:
- Request level: queue wait time, TTFT, total latency, output length, error code distribution;
- Instance level: GPU memory usage, batch size, concurrency, context length distribution;
- Dependency level: failure rate of authentication and quota interfaces, number of downstream timeouts;
- Business level: success rate by tenant and by endpoint, used to quickly scope the impact.
Illustrative metric collection logic (pseudocode):
def on_request(req):t0 = now()with metrics.timer("queue_wait"):slot = scheduler.acquire(req.max_tokens) # wait in queue for resourceswith metrics.timer("first_token"):first = engine.prefill(slot, req.prompt)with metrics.timer("decode"):out = engine.decode(slot, first)metrics.count("errors", tags={"code": out.code, "tenant": req.tenant})return out
The key principle is that queue wait time must be measured separately from execution time; otherwise you cannot distinguish “not enough resources” from “inference got slower.”
4. Resilience Design One: Capacity and Elasticity
Capacity planning should be priced against peak, not average, and should reserve a safety margin. Practical measures include:
- Set target concurrency and GPU memory watermarks based on historical peaks, keeping normal operation below 70% of the safety threshold;
- Run inference instances on a container platform, with elastic scaling driven by queue length and TTFT rather than CPU alone;
- Isolate long-context requests into a separate resource pool so long requests do not block short ones;
- Move non-real-time work (such as batch jobs and result archiving) to asynchronous processing via object storage and message queues, so the online path performs only the necessary computation.
5. Resilience Design Two: Traffic Governance and Fallback
What really keeps the service alive during peak hours is ingress governance:
- Enforce tiered rate limiting and priority queues at the gateway to protect paid or core business;
- Use exponential backoff with random jitter on the client to eliminate synchronized retry storms;
- Set timeout budgets and fail fast with a clear error code once the budget is exceeded, avoiding resources being held by ineffective work;
- Design a fallback chain: when the LLM is unavailable, fall back to a smaller model, cached results, or rule-based responses to keep functionality “available but degraded.”
request → auth → priority check → rate-limit token bucket├─ quota available: enter inference queue (pooled by max_tokens)└─ no quota: return cached/small-model result as fallback
6. Resilience Design Three: Reducing Reliance on a Single Endpoint
One valuable discussion from the incident was whether the capability could still be used when the online endpoint was unavailable. The answer depends on whether the architecture supports an offline form. Deploying the model privately on your own container platform and exposing a consistent interface through a unified gateway can significantly reduce reliance on a single online service. At the same time, bringing prompt templates, result caches, and evaluation sets under version control means business code needs no changes when switching endpoints. This layering of “interface abstraction plus replaceable backend” is the key to how open-source models deliver real engineering value to everyday users.
7. Post-Incident Checklist: Turn One Failure into a Long-Term Asset
- Did you separate queuing metrics from execution metrics?
- Do you have a success-rate dashboard broken down by tenant?
- Have clients implemented backoff and idempotency?
- Is there a fallback path, and is it drilled regularly?
- Have you run peak load tests and validated GPU memory watermarks?
- Have you documented your capacity assumptions and updated them as context length changes?
The conclusion is clear: intermittent unavailability during peak hours is essentially GPU memory and scheduling resources being overwhelmed by a sudden peak and amplified by unconstrained retries. Starting from observability, and combining capacity elasticity, ingress governance, fallback, and a replaceable backend, is what allows the impact to be kept within an acceptable range when a similar incident happens again.
