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

    This article reviews a typical full-chain LLM service outage and breaks down what a single inference request actually passes through: access, gateway, scheduling, inference, and dependencies. It explains why multiple clients fail at once using queueing behavior, retry storms, capacity planning gaps, and state inconsistency, then derives first principles for availability and practical engineering measures such as layered rate limiting, priority queues, predictive scaling, multi-AZ isolation, observability, and error semantics. It also covers post-incident review and drills, plus continuity advice for enterprise and individual users.

    1. The Incident in Abstract: A Typical LLM Service Outage

    One afternoon, an AI assistant platform focused on long-context processing experienced a widespread outage: the web app stalled while loading, message sends failed, mobile sync broke, and developer APIs kept returning errors. Sessions were cut off mid-stream, and in-progress document parsing and code generation tasks were terminated. The status dashboard showed varying degrees of degradation across the main chat service, the coding service, and the underlying model cluster. A small number of accounts could access the service intermittently but with very poor stability, and the paid tier was affected as well. Initially, no incident explanation or estimated recovery time was published.

    Setting aside the specific provider, this is a very typical “simultaneous full-chain degradation” failure. Its signature is not that one module dies completely, but that the entry point, gateway, inference layer, and dependency layer all start timing out and erroring at the same time, which users experience as “sometimes it works, sometimes it doesn’t.” To understand it, you first need to break down the path of a single LLM request.

    2. Request Path Breakdown: What an Inference Request Actually Traverses

    A typical online inference request crosses at least five layers:

    1. Access layer: load balancing, authentication, tenant identification, and quota checks.
    2. Gateway layer: rate limiting, routing, request body size validation, and protocol translation.
    3. Scheduling layer: model version selection, queueing, and batch aggregation.
    4. Inference layer: GPU memory and compute allocation, context length handling, and decoding.
    5. Dependency layer: session storage, object storage, logging and monitoring, and billing/usage accounting.

    Long-context scenarios are special because per-request resource usage grows roughly non-linearly with context length, and intermediate attention states must stay resident in GPU memory. This means a small number of very long requests can occupy a large share of resources, creating an amplification effect where a few requests drag down the whole system.

    3. Failure Mode Analysis: Why Multiple Clients Error Simultaneously

    Queueing theory view. Inference resources are a finite set of parallel servers. Once the request arrival rate exceeds the service rate, queue length grows without bound and wait time climbs from milliseconds to seconds. Clients time out first, then retry, and retries push the arrival rate even higher, forming a positive-feedback avalanche.

    Retry storms. If both clients and the gateway are configured with aggressive retries, a single hiccup gets amplified several times over. A sensible backoff strategy should include jitter to avoid synchronized resonance:

    1. import random, time
    2. def call_with_backoff(fn, max_attempts=3, base=0.2, cap=2.0):
    3. for attempt in range(max_attempts):
    4. try:
    5. return fn()
    6. except TransientError:
    7. if attempt == max_attempts - 1:
    8. raise
    9. delay = min(cap, base * (2 ** attempt))
    10. time.sleep(delay * (0.5 + random.random() / 2)) # exponential backoff + jitter

    Capacity planning gaps. Historical records show the platform had already suffered repeated disruptions from tight compute scheduling: when new models launched, instantaneous peaks approached the cluster ceiling and subscription entry points were temporarily tightened; during version rollouts, API throttling and usage accounting anomalies occurred and were publicly apologized for. This indicates the capacity watermark had long been running without headroom, so any hotspot event would punch through it.

    State inconsistency. A mid-session interruption is often not a compute failure but a broken stickiness between session state and the streaming connection: the connection gets rescheduled to another instance while the context was never externalized to persistent storage, so “disconnect means amnesia.”

    4. First Principles of Stability Design

    LLM service availability can be roughly expressed as:

    1. A ≈ 1 / (1 + queue wait time / client tolerated timeout)

    The conclusion is direct: the shortest path to higher availability is not piling peak compute toward infinity, but pushing queue time inside the client’s tolerance window. This yields four design principles:

    • The entry point must be able to reject. Traffic that cannot be served should be rejected quickly at the gateway with clear retryable semantics, rather than failing deep in the inference layer.
    • Priority must be distinguishable. Paid and free, interactive and batch traffic should use different queues so long jobs don’t starve short requests.
    • State must be externalized. Sessions and intermediate document-parsing artifacts should land in persistent storage, so switching instances doesn’t lose context.
    • Degradation must be pre-designed. When a model is unavailable, there must be an explainable minimum viable capability to fall back on.

    5. Practical Engineering Solutions

    5.1 Layered Rate Limiting and Priority Queues

    At the gateway, apply token-bucket rate limiting across three dimensions—tenant, endpoint, and context length—and route very long context requests to a dedicated resource pool:

    1. limits:
    2. - name: interactive-short
    3. max_context: 8k
    4. qps_per_tenant: 20
    5. pool: inference-interactive
    6. - name: long-document
    7. max_context: 200k
    8. concurrency_per_tenant: 2
    9. pool: inference-longctx
    10. queue: batch-priority

    5.2 Elastic Compute and Warm Pools

    Autoscaling cannot look at CPU utilization alone; model instances can take tens of seconds to cold-load, so scaling must happen ahead of demand. A workable approach is predictive scaling based on queue length and estimated wait time, while keeping a proportion of always-warm standby instances. Placing model weights on shared storage or an image acceleration layer also shortens cold-start time.

    5.3 Multi-AZ Deployment and Fault Isolation

    Deploy the access and inference layers across availability zones, with health checks automatically removing a failed zone. For stateful sessions, use externalized storage with multiple replicas so sessions can be rebuilt after failover. Cross-zone traffic requires evaluating bandwidth and latency costs, avoiding a situation where disaster recovery is available but not fast.

    5.4 Observability and Error Semantics

    Error codes must distinguish “retryable” from “non-retryable.” A simple mapping convention:

    Semantics Meaning Client Action
    Rate limit Quota temporarily exceeded Back off and retry
    Overload Server queue is full Degrade or reschedule
    Auth Credential or permission issue Do not retry
    Dependency Downstream storage failure Limited retries

    End-to-end metrics must also be collected: request queue time, time to first byte, decode rate, per-request GPU memory usage, and retry rate. Without queue time, you cannot locate the real bottleneck behind “the user feels it’s slow.”

    6. Post-Mortems and Drill Mechanisms

    The value of a post-mortem is turning the incidental into the preventable. A fixed four-step process is recommended: confirm impact scope and timeline, identify trigger conditions and amplification paths, produce verifiable improvement items, and schedule regression drills. Drills should include dependency fault injection, peak load testing, and dedicated long-context load testing, and the timeliness of official status page updates should be part of the process, because an information vacuum itself amplifies user-side retries and complaints.

    7. Recommendations for Users

    For enterprise and individual users, continuity cannot be fully outsourced to the provider. Workable strategies include: run critical tasks in generate-verify-persist stages to avoid single-point dependence on a long session; keep local persistence and version retention for important outputs; implement idempotent submission and resumable transfer on the client; and prepare switchable alternative capabilities for core paths behind a unified abstraction layer so switching costs stay controlled.

    8. Conclusion

    What this incident really highlights is that once AI capabilities enter production pipelines, service continuity has escalated from an “experience issue” to a “business risk.” Elastic compute pools, layered rate limiting, externalized state, and a disaster recovery system form the reliability foundation of a commercial LLM service; in the general capability system of cloud platforms such as Baidu AI Cloud, categories like container platforms, message queues, object storage, and monitoring/alerting are the common building blocks for such a foundation. Building in headroom, isolation, and observability early is what keeps you from being forced to tighten the entry point when the peak arrives.