LLM Service Outage Postmortem: Building Elastic Compute and Disaster Recovery
This is a postmortem of a large-scale outage on a large language model (LLM) platform, explaining why AI service downtime is costlier than traditional web service failures. It classifies root causes into four types—capacity, dependency, scheduling, and release—and proposes designing continuity into the architecture through unitization, multi-AZ deployment with externalized state, and layered bulkheads. It details a three-tier elastic compute pool driven by business-side scaling signals, active load shedding with tiered degradation and retry budgets, and long-task recoverability via task persistence, segmentation, idempotency, and checkpoint resume. It also covers observability and SLOs with burn-rate alerts and chaos drills, a self-protection checklist for developers and enterprises, and a postmortem checklist.
1. Reading Back From the Symptoms: Why AI Service Downtime Is More Expensive
A recent large-scale service incident on an LLM platform showed highly typical composite symptoms. The web frontend stalled while loading pages, message submission failed, and public APIs kept returning error codes—the blast radius covered both end users and developer callers at the same time. Some sessions dropped mid-conversation, and in-progress long-running tasks such as document parsing and code generation were terminated outright. On the monitoring side, the primary service, code-related sub-services, and the model inference cluster all showed varying degrees of anomaly, and a few accounts could still be reached intermittently but with extremely poor stability. The payment channel received no isolation protection, interrupting member users’ document processing and project material organization. On the developer side, callers hit non-standard error codes that clients could neither classify nor safely retry, so business flows stalled completely.
Abstracting these symptoms yields two key conclusions.
First, the cost of an LLM service failure is asymmetric with a traditional web service. When a traditional service times out, the user simply refreshes; but when a long-text parsing or code-generation task is interrupted, what is lost is minutes—or even tens of minutes—of compute investment plus the user’s context, and the retry cost is extremely high. This means “being able to recover” and “not being interruptible” must be designed separately: the former is an availability problem, the latter is a waste of task state and compute cost.
Second, the fact that the failure spread from “edge access” all the way to “billing and quota” shows the call chain is too long. Authentication, quota checks, token metering, model routing, inference execution, and result return were chained together in a single synchronous path, so any jitter at one link was amplified into full-chain unavailability.
2. Root Cause Classification: Four Categories With Completely Different Remedies
Breaking “the service went down” into an actionable classification is the first step of a postmortem.
- Capacity root causes: A new model version goes live, a platform campaign runs, or an instantaneous traffic spike pushes load near the cluster’s capacity ceiling, causing queue backlog that degrades time-to-first-token and overall latency together. The remedy here is elasticity and admission control, not adding machines.
- Dependency root causes: The rate limiter, quota accounting, token metering, or authentication service fails, so requests are rejected before they even reach inference. The remedy is dependency decoupling and “accounting without blocking.”
- Scheduling root causes: Compute resources are tight and multiple tasks compete for the same resource pool, so instance queuing and task queuing stack on top of each other. The remedy is priority scheduling, controlled co-location ratios, and bulkhead isolation.
- Release root causes: During a gray rollout of a new model or version, weight loading slows, GPU memory usage rises, and instance readiness time stretches, so effective capacity drops sharply during rolling updates. The remedy is readiness probes plus a conservative gray-release cadence and reserved capacity.
The historical disturbance patterns described in the original article—instantaneous peaks approaching the capacity ceiling during new-model launch, and rate-limiting and token-statistics anomalies during version iteration—fall exactly into the capacity and dependency categories. These are predictable failures that can be planned for in advance. When predictable failures keep recurring, the underlying cause is a missing capacity plan for the change window and a lack of drill mechanisms.
3. Architecture: Making Continuity a Design Property
3.1 Unitization and Fault Domain Isolation
Partition the service by user dimension into several units (Sets), each carrying a complete set of access, orchestration, and inference resources, with no shared critical-path dependencies between units. The impact of a single unit’s failure is confined to 1/N, and traffic scheduling can shift that unit’s users out entirely. For services focused on long-text processing, unitization brings an extra benefit: session state and cache locality within the same unit are better, so long-context reuse hit rates are higher.
3.2 Multi-AZ Deployment and State Externalization
Keep the access layer stateless, and externalize session context, task state, and streaming-output cursors into data services with cross-zone replication. For foundational capabilities, you can use a container platform to host inference instances, object storage for model weights and intermediate artifacts, a message queue for task asynchrony and peak shaving, and log services plus monitoring and alerting for unified observability (for example, Baidu AI Cloud offers corresponding product forms for these general-purpose capabilities and can serve as one reference point in technology selection; specific parameters should follow the official documentation).
3.3 Layering and Bulkheads
Fully separate the gateway, orchestration layer, inference engine, and weight storage, giving each layer independent scaling and independent rate limiting. Give paying users and key developers their own resource pools or dedicated quota channels, so that a surge of free traffic cannot crowd out commercial capacity—this is the direct fix for the original article’s point that “the member channel was not spared from the failure either.”
4. Elastic Compute Pool: The Hard Part Is Not Scaling Out, It Is Scaling Lag
Scaling inference instances is far more expensive than scaling a stateless web service: container scheduling, weight pulling, GPU memory allocation, engine compilation, and warmup mean the whole cold start is typically on the order of minutes. This means passive elasticity based on CPU utilization will never react in time to a sudden peak.
The recommended approach is a three-tier compute structure:
- Baseline capacity: covers everyday P50 load at optimal cost;
- Elastic burst capacity: scales out ahead of time on “business-side signals” such as queue water level, queue latency, and time-to-first-token, rather than waiting for CPU to saturate;
- Warm and cold standby: warm standby instances stay resident with weights already loaded, and cold standby instances pull weights in advance but defer model binding, used as a fallback for extreme peaks.
For peaks that are already predictable (model launches, launch events, big promotions), reservation-based scaling should be used—complete warmup and readiness checks in advance to turn “uncontrollable bursts” into “controllable planned changes.” At the same time, you must explicitly control the co-location oversubscription ratio and set resource floors for core paths.
Key signals for the scaling policy:
scale_out_signals:- metric: queue_wait_seconds # queue latency, the most sensitive overload signalthreshold: 3.0- metric: ttft_p95_ms # time-to-first-token P95threshold: 4000- metric: inflight_per_replica # in-flight concurrent requests per instancethreshold: 0.8 # leave 20% headroom for bursts- metric: replica_ready_lag_seconds # instance readiness time, used for predictive compensationuse_for: prewarm_lead_time
5. Overload Protection: Active Rejection Beats Passive Avalanche
When the queue has already overflowed, continuing to accept requests only makes all requests time out together. The correct strategy is active load shedding based on queue latency, combined with tiered degradation.
Rate limiting should cover four dimensions: global total, per-model, per-tenant/account, and per-interface. Sample priority admission:
def admit(request, limiter, tiers):tier = resolve_tier(request) # paid / developer / free / internal# High-priority quotas are independent and not crowded out by low-priority trafficif not limiter.try_acquire(f"global:{tier}", tiers[tier]["qps"]):return reject(429, retry_after=estimate_wait(request))if request.queue_wait_estimate > tiers[tier]["max_wait_ms"]:return reject(503, reason="overload_shed") # active rejection, fail fastreturn enqueue(request, priority=tiers[tier]["priority"])
Suggested tiered degradation order (from “low impact” to “high impact”), predefined and switchable via hot toggles:
- Disable non-core enhancement capabilities (web retrieval, deep thinking, structured extraction, and other add-on features);
- Reduce the context limit and maximum output length for a single request;
- Convert long tasks to asynchronous queues that return a task ID, with the frontend polling or subscribing to progress;
- Return cached duplicate requests directly; fail non-duplicate requests fast with a clear expected-recovery notice;
- Keep read-only capabilities, and put write and billing operations into a queue.
It is especially important to emphasize the retry budget: both client and server must cap the retry ratio (for example, retries not exceeding 10% of normal traffic) and use exponential backoff plus random jitter. A retry storm without a retry budget is the most common way to amplify a local failure into a global one. Public APIs should also return structured, classifiable error semantics (overload, authentication, parameters, internal error), rather than leaving developers facing unclassifiable error codes.
6. Long-Task Recoverability: Downgrading “Interruption” to “Resume”
For scenarios such as long-text parsing and code generation, the most effective improvement is to decouple tasks from requests.
- Task persistence: On receiving a request, immediately persist it to storage and return a task ID, decoupling execution from the HTTP connection lifecycle;
- Segmented pipeline: Split a long document into fixed-size segments, process them one by one, and write results incrementally to disk, so that a single segment failure only reruns that segment;
- Idempotent submission: Use
request_id + segment_indexas the idempotency key, so repeated execution does not produce duplicate results; - Checkpoint resume: Externalize the streaming-output cursor and completed-segment state to storage, and continue from the cursor after instance rebuild;
- Explainable failure: Retain intermediate artifacts when a task fails, supporting manual or automatic re-entry.
def run_segment(task_id, idx, chunk):key = f"{task_id}:{idx}"if store.exists(key): # idempotency: skip if already donereturn store.get(key)try:result = model_client.generate(chunk, task_id=task_id, idx=idx)except TransientError:result = model_client.generate(chunk, task_id=task_id, idx=idx) # bounded retrystore.put(key, result) # incremental write, supports resumetask_state.mark_done(task_id, idx) # advance the state machinereturn result
Combined with an explicit task state machine (queued → running → partial → done / failed), users can see “progress 7/20, completed segments retained” rather than a task that vanishes into thin air.
7. Observability and SLO: Making “No Incident Report Published” Impossible
The core metrics that need to be collected reliably: overall availability, queue latency, time-to-first-token and total latency at P95/P99, per-instance concurrency and throughput, error-code distribution, instance readiness time, success rate of the quota and metering chain, and unit-level saturation.
On this basis, define SLOs and error budgets, and use burn-rate alerts instead of pure threshold alerts: a large budget consumed in a short time triggers an urgent page alert, while a budget consumed slowly over a long time triggers a ticket-level alert, avoiding alert fatigue. Ongoing efforts include full-chain tracing, shadow-traffic load testing, and regular chaos drills (randomly killing instances, injecting AZ isolation, simulating quota-service unavailability) to turn plans from documents into muscle memory.
External communication is likewise part of the technical metrics: the status page should show real-time health per service component; major incidents need to provide the blast radius, root-cause classification, fix timeline, and follow-up improvements. The original article’s point that “as of press time, the vendor had released no incident report and published no fix time” reflects a gap in the change and incident management process, not a lack of technical capability.
8. A Self-Protection Checklist for Developers and Enterprises
Regardless of the upstream provider’s capabilities, callers should build resilience on their own side:
- Asynchronous tasking: Route all long tasks through async APIs with idempotent submission, avoiding the total loss of compute and context when a long connection drops;
- Exponential backoff + jitter + retry budget, retrying only idempotent operations;
- Multi-model/multi-channel routing, keeping switchable backup capabilities in the orchestration layer (note: this refers to a general architecture pattern, not a comparison of specific vendors’ capabilities);
- Local persistence of context and intermediate results, with the ability to recover from any checkpoint;
- Local caching of quota and authentication state, maintaining availability via “record first, reconcile asynchronously later” when the upstream metering service fails;
- Business-side degradation switches, defining which steps can be skipped without blocking the main flow when upstream is unavailable;
- Explicit SLA terms with the upstream, covering availability definitions, incident response times, and compensation rules, and writing minimum capacity floors for critical paths into the contract.
9. Postmortem Checklist
- Do you have unitization and cross-AZ disaster recovery, and is the blast radius of a single fault domain quantifiable?
- Are scaling signals based on business-side overload metrics rather than resource utilization?
- Is there a reservation-based scaling and warmup process for predictable peaks, with drill records?
- Do paying and key developers use independent resource pools and dedicated quota channels?
- When the billing and quota chain fails, can you “account without blocking”?
- Does rate limiting cover all four layers—global / model / tenant / interface—and can degradation be hot-switched?
- Do both client and server have retry budgets, and does the API return classifiable error semantics?
- Are long tasks persisted, segmented, idempotent, and resumable?
- Are SLOs, error budgets, and burn-rate alerts in place, and are chaos drills routine?
- For major incidents, is the blast radius, root cause, and fix timeline published within the promised timeframe?
AI has become embedded in the critical paths of enterprise production and personal work, and the weight of service continuity keeps rising. For services whose core scenarios are long text and long context, the responsiveness of the elastic compute pool and the design quality of the disaster recovery system are not “nice-to-have operational work”—they are the foundational capability of commercial service reliability. Only by turning the four root-cause categories, the three-tier capacity structure, the five-tier rate limiting and degradation, and long-task recoverability into real engineering standards can a foreseeable capacity event stop at “minor degradation” rather than “full outage.”
