LLM Service Outage Post-Mortem: Technical Review and Disaster Recovery Practices

    This article reviews a typical large language model service continuity failure and explains why outages can hit web, mobile, and API clients at the same time. It covers error code governance for diagnosable failures, client-side fault tolerance such as exponential backoff, idempotency keys, stream resumption, asynchronous jobs, and degradation, plus server-side elasticity and disaster recovery foundations including elastic compute pools, multi-level rate limiting, circuit breaking, multi-zone failover, observability, and status communication. It also outlines capacity and resilience validation to run before release. Readers will learn practical patterns to make LLM services controllable, degradable, and recoverable during failures.

    1. Incident Overview: A Typical LLM Service Continuity Failure

    An AI assistant platform experienced a widespread outage in the afternoon. On the user side, the web app stalled while loading, message delivery failed, and both the mobile app and developer APIs returned errors. Some sessions were cut off mid-conversation, and in-progress document parsing and code generation tasks were terminated. Monitoring data showed varying degrees of degradation across the main chat service, the coding capability module, and the model inference cluster. A small number of accounts could access the service intermittently but with very poor stability. Paid tiers did not receive higher priority guarantees, developer calls returned custom error codes, and business flows could not complete. Initially, the provider gave no explanation or expected fix time.

    Once brand details are stripped away, this is a standard availability incident in a distributed inference system. Its value lies in exposing three layers of problems: insufficient overload protection at the traffic entry layer, insufficient compute elasticity in the inference cluster, and the absence of a failure communication mechanism.

    2. Why the Failure Erupted Across All Clients at Once

    The call chain of an LLM service is usually longer than that of a traditional web service:

    1. Access layer (authentication, rate limiting, routing)
    2. Session and context management layer (conversation history, long-text concatenation)
    3. Orchestration layer (tool calls, retrieval-augmented generation, document parsing pipelines)
    4. Model inference layer (GPU clusters, batch scheduling, KV cache)
    5. Result post-processing and streaming delivery layer

    Queueing latency amplification at any layer propagates back along the call chain. The inference layer is a typical high-load, low-elasticity stage: scaling out a GPU resource pool takes minutes or longer, while traffic spikes often arrive in seconds. When the batch queue backs up, timed-out requests are retried, and the retries add further load, creating a positive-feedback avalanche. This explains why the web app, mobile app, and APIs “failed at the same time”—they share the same backend resources.

    Long-context scenarios significantly amplify the risk. As context length grows, attention computation and GPU memory usage rise nonlinearly. A single request consumes substantial resources and waits in queue for a long time, so a burst of such requests can easily push the cluster beyond its capacity.

    3. Error Code Governance: Making Failures Diagnosable

    During the incident, developers received a custom 4028-style error that was semantically ambiguous and could not distinguish rate limiting, quota exhaustion, or backend unavailability. A production-grade service should classify failures explicitly:

    1. 429 -> rate limited, retry with backoff
    2. 402/403 -> quota or permission issue, retrying is pointless
    3. 503 -> backend temporarily unavailable, switch to a backup path
    4. 504 -> inference timeout, shorten context or downgrade the model

    Supporting requirements: return a structured reason in the response body (reason, retryable, retry_after_ms), and expose remaining quota hints in the response headers to prevent clients from retrying blindly.

    4. Client-Side and Business-Side Fault Tolerance

    • Exponential backoff with jitter: retry only retryable errors, with a maximum attempt count and an overall budget:
    1. def call_with_backoff(fn, max_try=3, base=0.5):
    2. for i in range(max_try):
    3. try:
    4. return fn()
    5. except Retryable as e:
    6. if i == max_try - 1:
    7. raise
    8. sleep(base * (2 ** i) + random.uniform(0, 0.3))
    • Idempotency keys: attach a unique request_id to each generation request to avoid duplicate billing and duplicate writes caused by retries.
    • Stream interruption and resumption: persist generated fragments so that, after recovery, generation continues from the breakpoint instead of restarting from scratch.
    • Task-based redesign: convert long-running tasks such as document parsing and code generation into asynchronous jobs, with the frontend polling or subscribing to progress, avoiding long-lived connections being cut off by timeouts.
    • Degradation strategy: when the primary model is unavailable, switch to a smaller-parameter model, shorten the context, or disable non-core tool calls to keep the service “available but degraded.”

    5. Server-Side Elasticity and Disaster Recovery Foundations

    • Elastic compute pool: reserve buffer capacity plus queue prioritization (paid and critical workloads first), with auto-scaling based on queue length and queueing latency rather than CPU metrics alone.
    • Multi-level rate limiting: three stacked layers—global entry-level limiting, tenant-level quotas, and per-request resource caps—to prevent a single long-context request from dragging down the whole system.
    • Circuit breaking and isolation: pool inference backends by model or tenant and isolate failure domains so a single cluster anomaly does not spread.
    • Multi-zone and cross-zone disaster recovery: plan capacity with N+1 redundancy and support cross-zone traffic scheduling.
    • Observability: build golden signals (success rate, time to first token, queueing time, GPU utilization, and GPU memory levels) from monitoring and alerting, logging, and distributed tracing, and configure automatic alerts based on latency and error rates.
    • Status page and communication: incident severity classification, public status updates, and expected fix times are indispensable for a commercial service.

    6. Capacity and Resilience Validation Before Release

    Historical records show that such platforms have repeatedly experienced rate limiting and metrics anomalies around major model version upgrades and subscription entry openings, indicating that changes combined with traffic peaks are the main trigger. The following actions should be built into the release process: full-chain load testing (including long contexts and concurrent tool calls), capacity watermark review, canary rollout with fast rollback, failure drills (randomly removing inference nodes, injecting queueing latency), and quota and billing reconciliation checks.

    7. Conclusion

    For enterprises and individuals whose workflows deeply depend on LLMs, service continuity has become a core criterion for selection and self-building. Cloud providers such as Baidu AI Cloud typically use container platforms to host elastic compute, message queues to smooth traffic peaks, and monitoring, alerting, and logging services to support observability, providing a general high-availability foundation for upper-layer intelligent applications. True reliability does not come from never failing once, but from being controllable, degradable, and recoverable when failures occur.