High Availability for LLM Inference Services: Failure Analysis and Operational Practices

    This article examines two large-scale access incidents at a large model service and extracts reusable engineering lessons without treating unverified external speculation as confirmed causes. It covers typical failure surfaces in high-concurrency AI inference, including capacity and compute bottlenecks, traffic spikes, dependency cascades, and ingress-layer risks. It then discusses high-availability design practices such as layered rate limiting, multi-AZ and multi-region redundancy, circuit breaking, degradation, queueing, and retry strategies with exponential backoff and jitter. The article also outlines observability metrics, incident response and postmortem processes, and a developer self-check list for reducing the impact of similar outages.

    I. Incident Background and Analysis Principles

    Recently, a large model service experienced two large-scale access incidents within two days. Its web and client interfaces frequently returned prompts such as “service busy” or “check your network and retry.” The first incident lasted about 12 hours, and the service gradually recovered after two rounds of fixes. A second incident occurred several hours later, and media reports based on hands-on testing confirmed the failure.

    The service provider did not disclose the causes. Claims that appeared in external discussion, such as “user volume exceeded expectations,” “insufficient compute,” “architecture and cost constraints,” and “network attack,” were all unverified third-party speculation. When analyzing incidents of this kind, three principles should be followed:

    1. Distinguish symptoms from causes: The prompts users see are symptoms; underlying causes require supporting evidence.
    2. Distinguish speculation from conclusions: Without official data or a postmortem report, only a ranked list of possibilities can be given; direct conclusions should not be drawn.
    3. Focus on general capabilities: Extract reusable technical problems from the incident rather than evaluating a specific product.

    II. Typical Failure Surfaces of High-Concurrency AI Inference Services

    Compared with traditional web services, large model inference has several clear differences: a single request takes longer, consumes more compute resources, and is sensitive to GPU memory and batching scheduling. These characteristics make the failure surfaces more concentrated.

    2.1 Capacity and Compute Bottlenecks

    The throughput of an inference cluster depends on the number of accelerator cards, the batching strategy, and the per-card concurrency limit. When traffic exceeds the theoretical peak, requests back up in the scheduling queue. The longer the queue, the longer the waiting time; after clients time out, they initiate retries, creating an amplification effect.

    Capacity planning usually requires reserved redundancy. A common practice is to use 1.3 to 1.5 times the daily peak load as the design capacity and to verify the actual upper limit regularly through stress testing. Stress test results should cover high-cost request types such as long-context and multi-turn dialogue requests. Looking only at short-text throughput can easily overestimate cluster capacity.

    2.2 Traffic Spikes

    Hot topics, version releases, and external referrals can all cause short-term traffic spikes. Spikes are characterized by short duration and rapid growth, and autoscaling often cannot respond in time.

    To handle spikes, admission control should be implemented at the ingress layer, quickly rejecting or queueing requests beyond capacity rather than letting all requests enter the backend at the same time and ultimately causing overall unavailability.

    2.3 Dependency Chains and Cascading Failures

    A request typically passes through multiple stages, including authentication, session management, content safety checks, inference scheduling, and result caching. If any stage slows down, it can drag down upstream components. For example, after a dependency times out, the caller’s connection pool is exhausted, and other normal APIs also fail. This phenomenon is called a cascading failure.

    2.4 Ingress Layer and Network

    Access gateways, load balancers, and long-connection management are another set of risk points. Too many long connections can exhaust gateway file descriptors or memory. Some clients reconnect immediately after receiving an error, causing a connection storm.

    III. Key Points of High-Availability Architecture Design

    3.1 Layered Rate Limiting and Admission Control

    Rate limiting should be deployed in layers: the global layer protects the overall cluster, the tenant layer ensures fairness, and the API layer prevents a single type of request from consuming all resources. Common algorithms include token bucket and leaky bucket. The following simplified token bucket logic illustrates the idea:

    1. class TokenBucket:
    2. capacity # Bucket capacity, i.e., allowed burst requests
    3. refill_rate # Number of tokens refilled per second
    4. tokens # Current number of tokens
    5. last_time # Last refill time
    6. function allow(now):
    7. elapsed = now - last_time
    8. tokens = min(capacity, tokens + elapsed * refill_rate)
    9. last_time = now
    10. if tokens >= 1:
    11. tokens = tokens - 1
    12. return ALLOW
    13. return REJECT_WITH_RETRY_AFTER

    When rejecting a request, the service should return a clear retry-after time rather than a generic “service busy” message. Clear feedback can reduce invalid client retries.

    3.2 Multi-AZ and Multi-Region Redundancy

    When a single availability zone fails, traffic should be able to switch to another region within minutes. The prerequisites for this capability include: model weights and configurations synchronized across regions; session state migratable across regions or rebuildable; and health checks that accurately reflect real inference capability rather than only process liveness.

    Redundancy also has costs. Standby clusters require continuous resource investment, so services should be tiered by business importance: core APIs maintain hot standby, while non-core functions can use cold standby or degradation.

    3.3 Circuit Breaking, Degradation, and Queueing

    A circuit breaker opens when the dependency error rate exceeds a threshold and directly returns a degraded result to avoid further resource consumption. Degradation strategies can include disabling non-core features, shortening the maximum output length, switching to a smaller model, or placing requests into an asynchronous queue for later processing.

    Degradation must be designed and drilled in advance. Degradation switches that have not been drilled often fail to work as expected in real incidents.

    3.4 Retry Strategy

    Retries can handle transient failures, but improper retries can worsen overload. A reasonable retry strategy should meet three conditions: apply only to retryable error codes, set a maximum number of attempts, and use exponential backoff with random jitter. Example logic:

    1. function call_with_retry(request, max_attempts):
    2. for attempt in 1..max_attempts:
    3. response = send(request)
    4. if response.success:
    5. return response
    6. if not response.retryable:
    7. return response
    8. base = 0.5 seconds * (2 ^ attempt)
    9. wait = random_between(0, min(base, 30 seconds))
    10. sleep(wait)
    11. return last_error

    Random jitter can spread retry requests that would otherwise occur at the same moment and prevent a new traffic peak.

    IV. Observability

    Without reliable monitoring, it is difficult for teams to determine the scope of impact early in an incident. It is advisable to build a system around the following categories of metrics:

    • Availability metrics: request success rate and error rate split by API and region.
    • Latency metrics: time to first byte, full response time, and queue time, which should be measured separately.
    • Capacity metrics: accelerator utilization, GPU memory usage, batch size, and queue depth.
    • Business metrics: session interruption rate, user retry count, and the frequency of various error prompts.

    Define service-level objectives (SLOs) for these metrics, such as “monthly request success rate no lower than 99.9%.” When the error budget is consumed quickly, trigger an alert and start the emergency process.

    Logs should include request identifiers, tenant identifiers, and error classifications so that they can be aggregated by dimension afterward. Note that logs must not record sensitive content entered by users; when necessary, mask it or retain only a hash.

    V. Incident Response and Postmortem

    5.1 Response Process

    An effective response usually includes four stages:

    1. Discovery: triggered by monitoring or user feedback, confirming the scope of impact and severity level.
    2. Stop the loss: prioritize degradation, rate limiting, and traffic switching to control the expansion of the incident.
    3. Localization: investigate along the request chain segment by segment, comparing changes in latency and error rate at each stage.
    4. Recovery and validation: restore service step by step, observe core metrics at each step, and release traffic only after stability is confirmed.

    5.2 External Communication

    During an incident, the status page should be updated promptly to explain the scope of impact, current progress, and estimated recovery time. Even if the cause has not yet been identified, confirmed facts should be published rather than remaining silent. Communication should avoid unverified cause judgments to prevent misunderstanding.

    5.3 Postmortem Report

    A postmortem report should include a complete timeline, scope of impact, direct cause, root cause, improvement items, and owners. Improvement items need to be measurable and have acceptance criteria. For example, “add a queue depth alert with the threshold set to 80% of the historical peak” is more specific than “strengthen monitoring.”

    VI. Developer Self-Check List

    • Is layered rate limiting applied at the ingress, with clear retry-after times returned?
    • Do client retries use exponential backoff and random jitter?
    • Are critical dependencies configured with timeouts, circuit breakers, and degradation paths?
    • Have degradation switches been drilled?
    • Does capacity planning cover long-context and other high-cost requests?
    • Are there monitoring dashboards split by region and tenant?
    • Is there a standard process for the status page and external communication?
    • Do postmortems produce improvement items with acceptance criteria?

    VII. Conclusion

    Access anomalies in high-concurrency AI services are usually the combined result of capacity, traffic, dependency, and ingress-layer issues. Faced with various external speculations, engineering teams should rely on their own monitoring data, first determine the scope of impact, and then gradually verify the causes. Over the long term, layered rate limiting, multi-region redundancy, reasonable retries, complete monitoring, and standardized postmortems are the main means of reducing the impact of such incidents.