Large Language Model Service Outages: Root Causes and High-Availability Strategies

    This article explains why large language model services can suddenly become unavailable, even when the web interface and API fail together. It shows how demand that outpaces capacity creates bottlenecks at the entry point, in the request queue, or on compute nodes, and how to tell a capacity shortage from a component failure. It then covers capacity estimation with Little's Law, elastic scaling, overload protection through rate limiting, admission control, graceful degradation, and circuit breaking, and ends with client-side resilience practices.

    1. Incident Overview and Problem Scope

    Availability problems in online AI services often do not come from a single faulty module. They usually occur when demand grows faster than the system can handle. One large language model service once became unavailable on a weekday, with both the web interface and the API failing at the same time. Users saw the message “Server is busy, please try again later” on the chat page, and the official status page also showed the related service as unavailable. That afternoon, the operations team confirmed the problem and began repairs. The service returned to normal in the evening.

    Incidents like this matter because they expose a common engineering problem to the public. When request volume rises sharply in a short period and inference resources cannot scale up quickly enough, bottlenecks appear at the entry point, in the queue, or on compute nodes. This article does not discuss the internal architecture of any specific vendor. It treats the incident as a general high-concurrency service design problem and presents reusable methods.

    2. Interpreting the Symptoms: Why the Web and API Fail Together

    The web interface and the API look like two separate entry points. In most architectures, however, they share the same inference cluster, scheduler, and authentication gateway. When backend capacity runs short, both entry points are affected at the same time.

    Messages such as “server busy” usually correspond to one of the following technical mechanisms:

    • The request queue reaches its limit, and new requests are rejected directly.
    • The gateway triggers rate limiting or admission control and returns a 429 or 503 status code.
    • A critical dependency, such as a model instance, cache, or configuration service, fails to respond in time. The upstream timeout then returns a generic error to the user.

    For developers, the first step in diagnosing a failure is to distinguish a capacity shortage from a component failure. A capacity shortage shows up as error rates rising together with load, spread fairly evenly across requests. A component failure usually concentrates errors in one availability zone, one type of instance, or one type of request. The two call for different responses, and a wrong diagnosis slows recovery.

    3. Root Cause Analysis: Mismatch Between Demand Growth and Compute Supply

    Discussions on social media generally attribute this outage to rapid growth in traffic. The reasoning is plausible from an engineering standpoint, but it needs data to confirm. User impressions alone are not enough. Capacity gaps can be estimated as follows:

    1. Demand side: measure daily active users, peak concurrency, average latency per request, and average output length.
    2. Supply side: measure the number of available inference instances, the throughput limit of each instance, and the time needed to scale out.
    3. Gap check: when peak demand exceeds the safe threshold of supply, the system enters a high-risk zone.

    The following is a simplified capacity estimation example. The parameters are illustrative values that show only the calculation method.

    1. def required_instances(peak_qps: float,
    2. avg_latency_s: float,
    3. concurrency_per_instance: int,
    4. headroom: float = 0.3) -> int:
    5. """Estimate the number of inference instances needed at peak load.
    6. peak_qps: peak requests per second
    7. avg_latency_s: average processing time per request (seconds)
    8. concurrency_per_instance: number of requests one instance can process in parallel
    9. headroom: reserved margin ratio to absorb traffic bursts
    10. """
    11. # Little's Law: average concurrency = arrival rate x average time in system
    12. concurrent_requests = peak_qps * avg_latency_s
    13. needed = concurrent_requests * (1 + headroom) / concurrency_per_instance
    14. return int(needed) + 1
    15. print(required_instances(peak_qps=120, avg_latency_s=8.0,
    16. concurrency_per_instance=16))

    This code applies Little’s Law: the average number of concurrent requests in a system equals the arrival rate multiplied by the average time each request spends in the system. Processing time for a large model request is usually much longer than for a traditional API call. Even when the request rate is moderate, these requests can consume concurrency quickly. Capacity planning therefore has to include both duration and concurrency, not only requests per second.

    Scaling delay is another factor that teams often overlook. A new instance must acquire resources, pull its image, load the model, and then start receiving traffic. This process can take several minutes or longer. When a traffic peak arrives, scaling out can only relieve later pressure. It cannot immediately fill a gap that has already opened.

    4. Capacity Planning and Elastic Scaling

    Capacity planning rests on two things: reserving resources in advance and responding quickly.

    • Reserve headroom: Keep resources at a multiple of historical peak load, rather than sizing them for average load.
    • Predictive scaling: Scale out ahead of known business events, such as new feature launches, trending topics, or holidays, instead of waiting for metric alarms.
    • Metric-driven elastic scaling: Use signals such as queue length and wait time to trigger scaling. Compared with CPU utilization alone, these metrics better reflect real load, especially for inference workloads with long processing times and large swings in GPU utilization.
    • Warm instance pool: Keep a small number of standby instances with models already loaded to shorten cold-start time.

    Elastic scaling is also limited by resource quotas and hardware supply. Architects should assume that scaling will be slow and put protection mechanisms in front, rather than relying entirely on automatic scaling.

    5. Overload Protection: Limit Traffic Rather Than Let the System Collapse

    Overload protection aims to degrade service in a controlled way when load exceeds capacity, so the whole system does not fail. Common methods include the following.

    5.1 Token Bucket Rate Limiting

    The token bucket algorithm allows short bursts of traffic while capping the long-term average rate. It works well as the first line of defense at the gateway layer.

    1. import time
    2. import threading
    3. class TokenBucket:
    4. def __init__(self, rate: float, capacity: int):
    5. self.rate = rate # tokens refilled per second
    6. self.capacity = capacity # maximum bucket capacity
    7. self.tokens = capacity
    8. self.updated = time.monotonic()
    9. self.lock = threading.Lock()
    10. def allow(self) -> bool:
    11. with self.lock:
    12. now = time.monotonic()
    13. elapsed = now - self.updated
    14. self.tokens = min(self.capacity, self.tokens + elapsed * self.rate)
    15. self.updated = now
    16. if self.tokens >= 1:
    17. self.tokens -= 1
    18. return True
    19. return False

    The gateway calls allow() when a request arrives. If it returns False, the gateway should immediately return a 429 status code with a Retry-After header, so requests do not pile up on the backend.

    5.2 Admission Control and Priority

    Not all requests carry the same business value. Requests can be prioritized by user tier, API type, or request cost, so that core tasks are protected under high load. Admission control should decide based on queue length or estimated wait time, not on a fixed concurrency limit alone. A fixed limit can fail when workload characteristics change. For example, if average output length grows, the same concurrency limit will consume more resources.

    5.3 Graceful Degradation

    Degradation strategies may include shortening the maximum output length, disabling non-core features, switching to a smaller model, or returning cached results. Degradation plans should be defined in advance, controlled by switches, and tested regularly, so teams do not have to make decisions during an incident. A degradation path that has never been rehearsed often fails during a real outage as well.

    5.4 Circuit Breaking

    When the error rate of a downstream instance exceeds a threshold, the circuit breaker should temporarily stop forwarding requests to it, giving the system time to recover. Circuit breakers should use a half-open state: let a small number of probe requests through, and increase traffic gradually only after recovery is confirmed. This prevents a recovering component from being overwhelmed again.

    6. Client-Side Resilience: How Callers Reduce the Impact

    Beyond server-side protection, client behavior also affects overall stability. If every client retries immediately after a failure, retry traffic stacks on top of the existing load and amplifies the problem, which prolongs the outage.

    Recommended practices include the following:

    • Set reasonable timeout values