Large-Scale LLM Service Outage: Technical Postmortem and Disaster Recovery Practices

    This article uses a large-scale outage of an AI chat and long-context processing platform as a sample to break down how multi-layer LLM service failures happen and how to respond. It maps user-facing unavailability into five layers (access, session, orchestration, inference, and quota/billing), explains why custom 40xx error codes are not capacity signals, and shows classification-based retry with a retry budget. It also covers stage persistence, idempotency keys, and resumable state for long-context pipelines, peak-shaped capacity planning with elastic pools and admission control, observability and status communication, and a practical service-continuity checklist.

    1. Event Overview: A Typical Multi-Point LLM Service Outage

    A conversational AI and long-context processing platform experienced a widespread outage on a weekday afternoon. On the user side, the web app stalled while loading, message submissions went unanswered, and mobile sync failed. On the developer side, APIs kept returning errors and long-running tasks dropped midway. From the monitoring perspective, the main chat service, the AI coding assistant, and a new-generation model inference cluster all showed anomalies to varying degrees. A small number of accounts could access the service intermittently, but very unstably.

    The technical signature of this kind of event is clear: it is not a single point of failure, but multiple layers under pressure at the same time. So the first step in a postmortem is not to guess the cause, but to build a layered model that decomposes “the unavailability users feel” into specific points in the request path.

    Note that this article does not evaluate any specific vendor or product. It treats the event as a sample of a common industry failure pattern and discusses general engineering practices for handling it.

    2. Layered Fault Localization: Breaking “Unavailability” Into Five Layers

    An online AI service typically consists of five layers. During localization, work top-down and rule them out one by one:

    1. Access layer: DNS resolution, load balancing, gateway authentication, and connection limits. Symptom: the web page keeps spinning and requests get no response.
    2. Session layer: context storage and session state consistency. Symptom: conversations drop midway, message history is lost, and state is out of sync across devices.
    3. Orchestration layer: task scheduling, long-text chunking, and tool-call orchestration. Symptom: long-running tasks such as document parsing and code generation are interrupted and cannot resume.
    4. Inference layer: model instances, batching queues, and GPU memory and compute pool watermarks. Symptom: queue times spike and timeout rates climb.
    5. Quota and billing layer: token quota accounting, rate-limit thresholds, and subscription channel priority. Symptom: quota accounting goes wrong and paid channels are throttled too.

    The key action in localization is aligning the timeline: put gateway-side request volume, inference-side queue length, and quota-side counter changes on the same time axis and compare them. In most cross-client simultaneous failures, the root cause lands in inference-layer capacity or quota-layer state inconsistency, while the access layer merely exposes the problem passively.

    3. Error Code Semantics: Why “An Error” Does Not Mean “No Capacity”

    During the event, developers received a custom status code. Such non-standard codes are not uncommon in the industry; they usually mean “authentication information or call credential validation failed,” not “the server is overloaded.” This is very easy to misread:

    • 429-style semantics: too many requests, back off and retry;
    • 5xx-style semantics: internal server error or an unavailable dependency, retry with caution;
    • Custom 40xx-style semantics: mostly credential, quota, tenant state, or policy validation issues.

    The engineering recommendation is that clients should not treat every failure as “just retry later.” Illustrative retry logic should distinguish error categories:

    1. RETRYABLE = {"429", "503", "504"}
    2. def call_model(payload, max_attempts=3):
    3. for i in range(max_attempts):
    4. resp = http_post(payload)
    5. if resp.ok:
    6. return resp.json()
    7. code = str(resp.status_code)
    8. if code not in RETRYABLE:
    9. # Credential/quota/policy errors: retrying is pointless, raise immediately
    10. raise NonRetryableError(code, resp.text)
    11. # Exponential backoff + jitter to avoid a retry storm
    12. sleep(backoff(i) + random.uniform(0, 0.3))
    13. raise ServiceUnavailable()

    At the same time, you must set a retry budget: cap the total number of retries and total elapsed time per request, so that upstream jitter is not amplified by clients into a secondary avalanche.

    4. The Special Fragility of Long-Context Scenarios

    Long-context processing is a core selling point of this kind of platform, and also the step most likely to be abandoned halfway during a failure. The reason is that long tasks are usually multi-stage pipelines: parsing, chunking, retrieval, generation, and post-processing. If any stage fails, the whole thing has to start over, which is very costly.

    There are three directions for improvement:

    • Stage-level persistence: write each stage’s output to object storage, so a failure only reruns the current stage;
    • Idempotency key design: generate an idempotency identifier for each task to avoid duplicate billing and duplicate writes caused by retries;
    • Resumable semantics: externalize session and task state to persistent storage so multiple clients read the same state, solving “switch device and lose memory.”

    An illustrative task state machine:

    1. CREATED -> SHARDING -> PARSING -> GENERATING -> POSTPROCESS -> DONE
    2. |
    3. +-> RETRYABLE_FAIL -> (back off, then return to the current stage)
    4. +-> FATAL_FAIL -> mark and notify

    5. Elastic Compute Pools: Capacity Is a Peak Shape, Not an Average

    A common mistake in inference capacity planning is buying resources based on average daily request volume. Real load is spiky, especially when model versions iterate, subscription entry points open up, and marketing campaigns stack up; instantaneous peaks can be several times the average. Practical approaches include:

    • Tiered resource pools: reserved instances guarantee the baseline, elastic instances handle peaks, and offline/low-priority tasks use preemptible resources;
    • Queues and admission control: apply token-bucket rate limiting at the entry, and send requests beyond capacity into a queue instead of failing them outright;
    • Priority scheduling: paid and critical business channels get higher weight, but they must have isolated dedicated quotas to avoid “the paid channel being dragged down too”;
    • Warm-up and lead time for scaling: model loading and GPU memory initialization take a long time, so scaling must happen ahead of traffic arrival.

    A simplified admission control sketch:

    1. if not limiter.acquire(tenant_id, tokens=estimate_tokens(req)):
    2. return queue_or_reject(req) # Prefer queueing; reject as a fallback

    6. Observability and Incident Communication

    During the event, the lack of an official explanation and no estimated fix time further amplified user-side anxiety. The technical side should build observability up front:

    • Golden signals: request success rate, queue latency, time to first token, token throughput, and timeout rate;
    • Dependency topology: automatically map the call relationships among the gateway, session store, inference cluster, and quota service;
    • Automated status page: drive the public status display from monitoring metrics to reduce manual lag;
    • Tiered alerts: distinguish capacity warnings, dependency degradation, and full unavailability, each mapped to a different response process.

    An external communication template should contain three elements: impact scope, current mitigation actions, and the next update time. Even when the cause is not yet identified, giving a next update time can significantly reduce the volume of complaints.

    7. A Practical Checklist for Service Continuity

    • Implement classification-based retries and a retry budget on the client to eliminate retry storms;
    • Add stage-level persistence, idempotency keys, and resume capability for long tasks;
    • Externalize session state to guarantee cross-device consistency;
    • Plan capacity by peak shape, with isolated dedicated quotas for paid channels;
    • Set up a status page and a scheduled update mechanism;
    • Run fault drills regularly to verify that degradation paths actually work.

    As AI capabilities become deeply embedded in production and office workflows, service continuity has been upgraded from an “operations metric” to a “business metric.” For resource-heavy, long-running scenarios such as long-context processing, elastic compute scheduling and disaster recovery are not a bonus, but the foundation of reliable delivery.