Large Language Model Service Outage: Technical Post-Mortem and High-Availability Architecture Practices
This article analyzes a typical large-scale outage of an online large language model (LLM) service and breaks down how failures propagate across the request chain, from the gateway and authentication layers to scheduling, inference, and external dependencies. It covers capacity and elasticity design, the four core stability mechanisms (rate limiting, circuit breaking, degradation, and isolation), multi-region active-active and disaster recovery topology, observability and incident response, and practical integration guidance for developers. Readers will find architectural patterns and pseudocode for building resilient LLM services under long-context and high-concurrency workloads.
1. Incident Overview: A Typical Online LLM Service Failure
One afternoon, a public-facing conversational AI and AI coding service experienced a widespread outage: the web client stalled while loading, message submissions failed, developer API calls returned persistent errors, active sessions were terminated mid-stream, and in-progress document parsing and code generation tasks were aborted. The status dashboard showed varying degrees of degradation across the main chat service, the coding service, and the model inference cluster simultaneously. A small number of accounts could access the service intermittently but with severe instability. The paid tier was affected as well. As of the official statement, the scope, root cause, and estimated recovery time were all unknown.
From a technical perspective, this was not a single-point crash but a textbook case of cascading failure, characterized by three common patterns:
- The entry layer and the inference layer were under pressure at the same time, with requests queuing at the gateway and timing out on the inference side.
- Stateful sessions were interrupted, and lost context made retries expensive.
- Errors were fragmented (timeouts, rate limiting, authentication, and quota errors mixed together), making it hard for users to distinguish “the service is down” from “I have exhausted my own quota.”
2. Failure Chain Breakdown: Why Failures Amplify Across the Stack
The request path of an online LLM service typically includes an access layer, an authentication and quota layer, a session and context storage layer, a scheduling layer, a model inference layer, and external tool and retrieval dependencies. Instability in any component is amplified along the chain:
- Access layer: Connection buildup, TLS handshake issues, and long-lived connection heartbeat anomalies cause both web and mobile clients to hang.
- Scheduling layer: Queue length grows, wait time exceeds the client timeout threshold, and “accepted but not completed” hanging requests accumulate.
- Inference layer: Long-text inputs significantly increase GPU memory usage and latency per inference, batching windows stretch, and throughput drops.
- Dependency layer: Timeouts in retrieval, plugins, and file parsing can consume threads and connections from the main request path in reverse.
It is worth emphasizing that long-context scenarios are extremely sensitive to GPU memory and batching strategy. As context length grows, the memory and compute cost of attention computation rises sharply. Without admission control, a small number of oversized requests can drag down the completion time of an entire batch.
3. Capacity and Elasticity: Design for Peak as the Norm
Past experience shows that model version rollouts, subscription openings, and trending events can push instantaneous peaks close to the cluster’s capacity ceiling. Capacity governance should cover three layers:
- Baseline capacity: Reserve headroom for daily peaks and avoid running steadily above 70% utilization.
- Elastic compute pool: Combine horizontal scaling on the container platform with buffering from task queues to scale out within minutes. For inference instances, account for model weight loading and warm-up time, and keep “warm-start” replicas on standby.
- Admission and quota: Enforce tiered quotas at the entry point by tenant, API, and context length, and fail fast on over-quota requests instead of queuing indefinitely.
Illustrative admission and degradation policy (pseudocode):
on_request(req):if not auth(req): return 401if quota_exceeded(req.tenant, req.model): return 429if req.context_tokens > LIMIT_HARD: return 413if queue_depth() > WATERMARK_HIGH:return shed_or_degrade(req) # queue degradation: shorten context / switch to a smaller modelreturn schedule(req)
4. The Four Pillars of Stability: Rate Limiting, Circuit Breaking, Degradation, and Isolation
- Rate limiting: Apply two-tier rate limiting at the gateway and scheduling layers, separating “global protection” from “tenant fairness” so a single large customer cannot monopolize resources.
- Circuit breaking: Set error-rate and timeout circuit breakers on downstream dependencies to prevent slow calls from piling up into an avalanche.
- Degradation: Predefine explainable degradation paths, such as shortening the processable context, disabling non-core plugins, or returning cached or summarized results, and clearly inform users that they are in a restricted mode.
- Isolation: Isolate resources between the paid and free tiers, and schedule long-text tasks and short conversations in separate pools to avoid interference.
5. Multi-Region and Disaster Recovery: Turn “Single Cluster” into “Switchable”
For enterprise-grade continuity targets, a topology of same-city active-active plus remote disaster recovery is recommended: the access layer performs failure-domain switching via traffic scheduling; session and context state is externalized to persistent storage and message queues so sessions can be recovered after a switch; model services are deployed symmetrically across failure domains, with capacity planned so that “a single domain can handle the full core traffic.” Switching must be paired with data consistency checks and idempotent retry mechanisms to avoid duplicate billing and duplicate generation.
6. Observability and Incident Response: Make Failures Locatable and Reviewable
Build a user-experience-centric metrics system: success rate, time to first byte, end-to-end latency percentiles, queue time, context length distribution, error code composition, and scale-out time. Logging and alerting should be integrated with distributed tracing to enable drill-downs by tenant and API. The incident response process should be standardized into four steps: confirm the impact scope, activate degradation, scale out and shift traffic, and communicate externally and conduct a post-mortem. The external statement should include the impact scope, actions taken, and follow-up improvements to reduce speculation and repeated inquiries.
7. Integration Guidance for Developers
- Set reasonable client timeouts and exponential backoff retries, and automatically retry only idempotent requests.
- Persist session context and support resumable transfers to avoid re-running an entire task after a mid-stream failure.
- Handle error codes by category: back off on rate-limit errors, prompt on quota errors, and correct on parameter errors — do not retry everything indiscriminately.
- Split long-text tasks into chunks and submit incrementally to reduce per-request resource usage and failure cost.
8. Conclusion
Competition in LLM services is shifting from “capability demos” to “continuity delivery.” An elastic compute pool, failure-domain isolation, recoverable sessions, and a complete observability system form the reliability foundation of a commercial service. Referencing the general capabilities of cloud providers such as Baidu AI Cloud (container platforms, message queues, object storage, logging, and monitoring/alerting) to build the above system can significantly improve service resilience under long-context and high-concurrency scenarios.
