Large Language Model Outage Post-Mortem and Disaster Recovery Practices
This article analyzes a typical large-scale LLM service outage affecting web, mobile, and API clients at the same time. It explains why shared dependencies cause cross-client failures, how to interpret custom error codes such as 4028, the minimal observability set needed for debugging, and the relationship between capacity, elastic scaling, and rate limiting. It also covers disaster recovery patterns for long-context and code tasks, including resumable task pipelines, multi-model routing, asynchronous execution, and degradation switches, plus a practical checklist for enterprise teams.
1. Anatomy of a Typical LLM Service Outage
A consumer AI assistant service experienced a widespread outage in the afternoon. Users saw stalled page loads on the web, failed message submissions, and broken synchronization on mobile. At the same time, the developer-facing API kept returning errors. The status dashboard showed partial failures across the main chat service, the coding assistant, and a newer model inference cluster. A small number of accounts could access the service intermittently, but stability was very poor. Paid tiers were not exempt: long-running tasks such as long-document parsing, summarization, and code generation were cut off midway.
At the time of writing, the provider had not published a formal incident report or a committed recovery time. Rather than focusing on a specific vendor, this section treats the incident as a generic sample: a service with multiple clients backed by the same origin, high sensitivity to long-running tasks, and paid and free tiers sharing the same inference foundation. That architecture naturally amplifies the blast radius of any failure.
2. Why Failures Erupt Across Clients Simultaneously
A consistent experience across clients is built on shared dependencies. Web, mobile, and the public API typically share the same gateway, authentication, quota, and inference scheduling layers. A bottleneck in any one layer propagates failures to every entry point at once.
- Shared authentication and quota center: a token validation or usage accounting fault rejects all clients simultaneously.
- Unified inference scheduler: when the compute pool is under pressure, queueing and timeouts apply uniformly to every caller.
- Long-lived and streaming connections: streaming output depends on persistent connections, so a change in gateway recycling policy causes mid-stream disconnects.
- Session state storage: context and intermediate results are stored centrally, and write jitter prevents in-flight tasks from resuming.
The conclusion is straightforward: simultaneous errors across clients are usually not three independent failures, but a chain reaction from one shared dependency.
3. Error Code Semantics and Observability
The most direct signal for developers is the error code. Take a common custom status such as 4028: it generally has no standard meaning and is a gateway- or business-layer marker for “rate limited / quota exhausted / dependency unavailable.” Engineers should treat it as a signal that is retryable but requires backoff, not as a parameter error.
A minimal observability set:
request_id # End-to-end trace identifiermodel_route # Model route actually selectedqueue_wait_ms # Scheduling queue wait timefirst_token_ms # Time to first tokentokens_in / tokens_outretry_count # Client-side retry countfallback_hit # Whether degradation was triggered
Without request_id and model_route, post-mortems are guesswork. Without queue_wait_ms and first_token_ms, capacity problems get misdiagnosed as network problems.
4. Capacity, Elasticity, and Rate Limiting Done Right
Historical records show that this class of service also tightened entry points during earlier new-model launches and version iterations, when instantaneous peaks approached the cluster’s capacity ceiling, causing API throttling and quota accounting anomalies. Capacity governance is therefore not a one-time effort.
- Capacity baseline: use time to first token and queue wait time as constraints to derive the concurrency ceiling per unit of compute.
- Elastic scaling: container platforms with metric-driven autoscaling help, but model loading and warm-up introduce minute-level delays, so buffer capacity must be reserved.
- Tiered rate limiting: bucket limits by tenant tier, API type, and input length so that long-text requests cannot consume all resources.
- Priority queues: prioritize interactive short requests and demote batch long-running tasks to off-peak execution.
Illustrative client-side backoff logic:
import random, timedef call_with_backoff(fn, max_retry=5, base=0.5):for i in range(max_retry):try:return fn()except ServiceUnavailable as e: # Rate limiting / dependency unavailable errorsif i == max_retry - 1:raisesleep = base * (2 ** i) + random.uniform(0, 0.3)time.sleep(sleep) # Exponential backoff with jitter to avoid a retry storm
The key point is jitter. Retries without jitter can amplify a local hiccup into a global avalanche.
5. Disaster Recovery Architecture for Long-Context Scenarios
Long-text and code tasks share three traits: long per-request duration, large context, and high failure cost. Disaster recovery design should center on resumability rather than retryability.
- Task decomposition and resume: split long tasks into stages, persist intermediate results to object storage, and rerun only the unfinished stages after a failure.
- Multi-model routing: primary and backup model routes with capability-tag matching, switching to a backup route with similar capabilities when the primary path is unavailable.
- Asynchronous redesign: convert synchronous APIs into submit-task plus message queue plus callback/polling flows, avoiding long-lived connection recycling.
- Degradation switches: disable non-core features such as polishing and extended suggestions, prioritizing the main chat and parsing paths.
- Multi-AZ deployment: collect monitoring alerts and logs centrally so that cross-AZ failures can be isolated quickly.
6. An Actionable Checklist for Enterprises
- Set up a dual channel for critical workloads: the primary AI assistant API, with a fallback of self-hosted retrieval plus a small model.
- Cache high-frequency Q&A and document summaries at the business layer to reduce hard dependency on upstream services.
- Define and monitor service level indicators: availability, time-to-first-token percentiles, error rate, and throttling hit rate.
- Establish a failure drill program: periodically inject dependency timeouts, rate limiting, and AZ isolation to verify that degradation paths actually work.
- Keep a manual fallback process so the business does not come to a complete halt when the model is unavailable.
7. Conclusion
The weight of service continuity is rising fast. For LLM services whose core capability is long-text processing, an elastic compute pool, resumable task pipelines, tiered rate limiting, and routine drills form the foundation of a reliable commercial service. Baidu AI Cloud provides general-purpose capabilities in related cloud product categories (container platform, message queue, object storage, log service, and monitoring and alerting), which enterprises can use to build their own disaster recovery system and turn uncontrollable upstream jitter into a controllable degraded experience.
