Large Language Model Service Outage: Technical Post-Mortem and Disaster Recovery Practices
This article analyzes a large-scale large language model (LLM) service outage, breaking down the request lifecycle to show how shared dependencies cause cascading failures. It covers error code classification, client-side and architectural resilience patterns such as idempotency, layered degradation, and bulkhead isolation, elastic capacity planning, observability, and disaster recovery drills. Readers will learn how to treat service continuity as a first-class design metric rather than an after-the-fact fix.
1. Event Overview: A Typical LLM Service Continuity Failure
An AI assistant platform experienced a widespread outage during peak business hours. The symptoms were highly typical: the web app stalled while loading, message submissions failed, mobile sync broke, and developer-facing APIs kept returning errors. Some sessions were forcibly interrupted halfway through their context. Monitoring dashboards showed that the primary inference service, the coding assistant service, and a new-generation model cluster were all degraded to varying degrees. A small number of accounts could access the service intermittently, but stability was extremely poor. The paid tier showed no stronger isolation, which indicates the failure was in the shared foundation rather than a single access layer.
From an engineering perspective, this was not a single-point crash but a cascading failure of shared dependencies. To understand it, you need to break a single user request apart.
2. Request Path Breakdown: Which Layer Can Fail
A typical LLM request passes through the following stages:
- Access layer: the client (web/mobile/open API) initiates the request and handles authentication, rate limiting, and routing.
- Session layer: maintains multi-turn context and manages session state and history storage.
- Orchestration layer: intent recognition, tool calls, retrieval augmentation, and prompt assembly.
- Inference layer: the model cluster performs decoding, consuming compute and GPU memory.
- Post-processing layer: streaming output, content safety filtering, result persistence, and metering.
- Metering and quota layer: token counting, quota deduction, and billing.
Long-context and code tasks are special because a single request has a large context window, long decoding time, and unpredictable resource usage. The longer a request’s lifecycle, the higher the sunk cost lost when it is interrupted. This is the root cause of the terrible “terminated halfway” experience for document parsing and code generation tasks during an outage.
3. Error Code Governance: Don’t Collapse Every Failure into a Single 4028
During the event, developers observed the API returning a non-standard error like 4028. In engineering practice, compressing many causes into a single error code is the biggest enemy of troubleshooting efficiency. It is recommended to distinguish at least the following semantics:
- Authentication: invalid key, expired signature, insufficient permissions.
- Quota: exhausted quota, concurrency limit exceeded, tenant-level throttling.
- Capacity: cluster busy, queue timeout, no available backend instances.
- Dependency: vector retrieval timeout, cache unavailable, downstream model service circuit-broken.
- Context: input exceeds the window, document parsing failed, invalid format.
Illustrative wrapper:
class UpstreamError(Exception):code: strretryable: booldef classify(resp):if resp.status in (429, 503):return UpstreamError("CAPACITY_BUSY", True)if resp.status in (401, 403):return UpstreamError("AUTH_DENIED", False)if resp.code == "CONTEXT_TOO_LONG":return UpstreamError("CTX_OVERFLOW", False)return UpstreamError("UPSTREAM_UNKNOWN", True)
Only when retryable is true should the request enter backoff retry. This avoids amplifying unrecoverable errors into a retry storm.
4. Client-Side and Architectural Resilience Design
1. Idempotency and Recoverable Sessions
For streaming output, attach an idempotency key to each request and persist the generated fragments. On recovery, continue writing from the breakpoint instead of making the user rerun a ten-minute parsing task.
2. Layered Degradation
- Disable non-core retrieval augmentation and tool calls first to keep basic conversation available;
- Automatically downgrade long-text tasks to segmented processing;
- Switch coding capabilities to a smaller general-purpose model as a fallback.
3. Bulkhead Isolation
C-end interactive traffic, batch offline jobs, and open API calls should live in different resource pools and quota domains. Sharing one pool means letting offline batch processing crowd out online interaction.
4. Client Experience
Request timeouts and “service busy” states need clear messaging and automatic re-submission, avoiding an endless frontend loading spinner that creates a “frozen” impression.
5. Elastic Compute and Capacity Planning
The capacity challenge for LLM services is that the peak-to-trough ratio is extremely high and scaling has a lag. Viable approaches include:
- Build composite scaling metrics based on queue length, queue latency, and decoding throughput, rather than looking only at CPU;
- Reserve a portion of always-on buffer capacity to handle sudden peaks;
- Schedule offline jobs off-peak, filling deferrable work into the troughs;
- Establish a multi-tier model matrix (large/medium/small) and route dynamically by load.
6. Observability and Drills
Without observability, fault localization is guesswork. The minimum viable set is: request volume, success rate, first-token latency, overall latency percentiles, queue time, token consumption, and error code distribution, with a linked dashboard across logging, monitoring, and alerting.
Drills should also be routine: randomly remove inference instances, inject downstream timeouts, and simulate quota service unavailability to verify that circuit breaking and degradation work as expected. A disaster recovery plan that has never been drilled is equivalent to no plan at all.
7. Service Continuity Commitments and Cost Balance
When enterprises procure LLM capabilities, they should focus on service level objectives, outage announcement mechanisms, status page transparency, and compensation policies, rather than unit price alone. In related practices, Baidu AI Cloud emphasizes combining monitoring and alerting, elastic scaling, and multi-availability-zone disaster recovery to ensure continuity; this general capability combination can serve as an architecture reference baseline. For self-built teams, the core conclusion is a single sentence: design “continuity” as a first-class metric, not a remedy after a failure occurs.
