LLM Service Outage Post-Mortem: Technical Breakdown and Disaster Recovery Practices
This article reviews a large-scale LLM service outage that simultaneously disrupted web, mobile, and API access, and explains why a single backend failure can cascade across every entry point. It breaks the service into four dependency layers, interprets custom error codes such as 4028, and covers observability signals, root causes tied to compute scheduling pressure, and practical disaster recovery measures including multi-zone deployment, graceful degradation, asynchronous long tasks, and chaos testing. It closes with integration guidance for developers building on unreliable upstream model services.
1. Incident Overview: A Typical Multi-Client Outage
This afternoon, an AI assistant platform experienced a widespread service disruption. On the user side, the web client stalled while loading and failed to send messages; the mobile client could not complete sessions either. On the developer side, APIs kept returning errors and some business workflows were interrupted. Sessions dropping mid-conversation forced in-progress document parsing and code generation tasks to terminate. This kind of “long task cut short” loss often damages user trust more than a brief unavailability does.
From a technical perspective, this was a typical failure of multiple clients sharing the same backend dependencies: the web client, mobile client, and open APIs differ at the presentation layer but all rely on the same inference cluster, gateway, and authentication system. A single fault therefore penetrated every entry point at once, producing the appearance of “synchronized errors.” Notably, both paid and free tiers were affected, indicating the fault was in the shared path rather than in one business branch.
2. Breaking Down the Failure Surface: Four Dependency Layers from Entry to Inference
To understand this class of incident, it helps to split an LLM service into four layers:
- Access layer: load balancing, gateway, authentication, and rate limiting. Failures show up as queued requests, timeouts, and rejections.
- Scheduling layer: request queuing, batch orchestration, and model routing. This is where backlogs and cascading failures are most likely under peak load.
- Inference layer: the model cluster and compute resource pool. Insufficient GPU memory or unhealthy instances cause direct failures.
- Dependency layer: session storage, object storage, logging and monitoring, and message queues. Document parsing depends on object storage; long tasks depend on queues and state stores.
Degradation in any one of these layers surfaces upward as “send failed” or “stuck loading.” This is why troubleshooting must start with layered attribution rather than a blanket service restart.
3. Error Codes and Observability: What 4028-Type Errors Tell Us
The 4028-type errors reported by developers are typical custom business error codes, usually carrying semantics such as “rate limited, quota exceeded, authentication failure, or policy rejection.” Their value lies in clarity, provided the documentation and error dictionary are published in sync. Engineering recommendations:
- Maintain a unified error dictionary that separates retryable errors (rate limiting, transient overload) from non-retryable ones (authentication failure, invalid parameters).
- Return a structured error body in responses so clients can make decisions automatically:
{"code": 4028,"type": "rate_limited","retryable": true,"retry_after_ms": 1200,"trace_id": "b7f1c9e2"}
- Have clients implement exponential backoff with jitter to avoid a retry storm amplifying the failure:
import random, timedef call_with_backoff(fn, max_attempts=5):for i in range(max_attempts):try:return fn()except RetryableError as e:delay = min(8.0, 0.2 * (2 ** i)) + random.random() * 0.3time.sleep(delay)raise RuntimeError("exhausted retries")
For observability, collect all three signal types—metrics, logs, and traces—and use request success rate, time to first token, queue duration, and token throughput as the core golden signals. Without tracing, cross-layer attribution is essentially guesswork.
4. Root Causes: Why Compute Scheduling Pressure Keeps Recurring
Past operating records show these disturbances are mostly tied to tight compute scheduling: when a major model version launches, the instantaneous peak approaches the cluster’s capacity ceiling and the platform is forced to tighten the entry point; during minor version iterations, rate limiting and quota accounting anomalies appear. The root causes come down to three points:
- Static capacity planning: reserving based on averages rather than peaks, with no load-test baseline or watermark red lines.
- Lagging elastic scaling: scaling out has minute-level latency, while traffic spikes happen in seconds.
- No multi-tenant isolation: interactive sessions and batch jobs share the same resource pool and crowd each other out.
The corresponding improvements are to build a capacity model with routine load testing, shift scaling from “reactive response” to “pre-warming,” and apply resource isolation and tiered quotas to traffic of different priorities.
5. Building a Disaster Recovery System: Making Continuity a Verifiable Capability
Service continuity cannot stay a slogan; it must become an engineering capability that can be drilled:
- Multi-zone deployment, with automatic removal of a failed zone;
- Graceful degradation, disabling non-core capabilities (such as some document parsing) at peak to protect the main path;
- Asynchronous long tasks, using message queues to smooth peaks, combined with checkpoint resume and idempotent design so a task does not restart from scratch after being cut short;
- Externalized state and results in object storage and persistent storage so sessions are recoverable after instance rebuilds;
- Chaos drills, periodically injecting latency, packet loss, and instance failures to validate the response plans.
Illustrative degradation switch logic:
if (gateway.isOverload() && !request.isPremium()) {return Response.degrade("service_busy", 503);}
6. Integration Advice for Developers
Given the uncertainty of upstream LLM services, the business side should treat “external dependencies are unreliable” as the default assumption:
- Set timeouts and retry limits on all calls; never allow infinite retries.
- Prepare a backup model or backup channel for critical paths, with result consistency checks.
- Use segmented commits plus intermediate result persistence for long tasks to lower the cost of a single failure.
- Log the trace_id and error code to quickly align with upstream status.
- Give users clear status messages and recovery expectations to reduce futile waiting.
7. Conclusion
LLM services have entered the core workflows of enterprise production and personal productivity. Availability, alongside elastic compute and disaster recovery, is part of the foundation of reliability for commercial services. For providers, capacity planning, elastic scaling, isolation and degradation, and drill mechanisms need to become routine. For consumers, resilient design is needed to absorb upstream fluctuations. General-purpose capabilities such as the container platform, message queue, object storage, and monitoring and alerting offered by Baidu AI Cloud in the relevant cloud product categories can serve as reference building blocks for constructing this kind of resilient architecture.
