What to Do When LLM Services Are Unstable: Availability and Resilience Practices
Most LLM service outages are partial—a specific model, region, or time window experiences API failures. This article explains how to read availability metrics like uptime percentages, MTTR, and MTBF, why LLM inference is harder to keep stable than ordinary web APIs, and how application teams can defend themselves with safe timeout and retry strategies, including which errors are retryable and which operations should never be retried automatically.
What to Do When LLM Services Are Unstable: Availability and Resilience Practices
Most LLM service failures are partial: a specific model, a specific region, or API calls within a specific time window stop working. A common pattern in developer communities is that pages fail to load during peak hours, API calls occasionally time out, and things recover after a while. These issues are hard to fix once and for all. Application teams need to know how service quality is measured and how to build fallbacks into their own systems. This article proceeds in the following order: understand the metrics, understand the root causes, build defenses, and push the platform to improve.
1. Understand Availability Metrics First
Availability is calculated as “normal service time ÷ total time.” Taking a 30-day month (43,200 minutes) as an example:
- 99.9%: about 43 minutes of allowed downtime
- 99%: about 7.2 hours of allowed downtime
- 99.99%: about 4.3 minutes of allowed downtime
These numbers depend on how they are measured. Whether scheduled maintenance counts, whether “available” means the page loads or the API success rate meets a threshold, and whether the measurement window is a calendar month or a rolling 30 days can all produce different conclusions for the same service. When evaluating a provider, ask them to explain their methodology first, then compare the numbers.
MTTR (mean time to recovery) and MTBF (mean time between failures) are two independent metrics. Low MTTR means fast recovery after an incident; high MTBF means incidents are rare. Both matter: fast recovery with frequent flapping still interrupts users repeatedly, while rare failures that last for hours each time also hurt the business. Teams can combine the two into a target, such as “no more than 2 unplanned incidents per month, each recovered within 30 minutes.”
2. Why LLM Inference Is Hard to Keep Stable
LLM inference differs from ordinary web APIs in three important ways.
First, high resource consumption. Inference depends on compute such as GPUs, and a single request can take anywhere from a few hundred milliseconds to tens of seconds. Once instantaneous concurrency exceeds cluster capacity, requests queue up; queuing causes timeouts; client retries after timeouts add more load, eventually triggering an avalanche.
Second, load is hard to predict. Input and output lengths vary widely, so the same number of requests per second can correspond to several times the actual compute at different times. Scaling strategies based on historical averages often fail to keep up with sudden traffic spikes.
Third, the call chain is long. A single call may pass through gateway authentication, load scheduling, model loading, KV cache management, and streaming output. If any stage slows down, the user sees the same symptom: longer waits or dropped connections.
These three points mean the application side cannot assume the service is always available, nor can it rely solely on the provider’s status page to detect problems.
3. Defense Practices on the Application Side
1. Timeouts and Retries: Only Retry Safe Requests
Retrying is the most common measure—and the one that most easily causes incidents. Before retrying, answer two questions: can this request be safely executed multiple times? Is the failure a transient error?
Errors that are typically safe to retry include connection timeouts, read timeouts, 429 (rate limiting), and 500, 502, 503, 504. Retrying parameter errors (400) or authentication failures (401, 403) is pointless—report the error directly.
Non-idempotent operations such as billing, database writes, or message sending can cause duplicate charges or duplicate data if retried automatically. Disable automatic retries for these and instead confirm results through a task system or manually. Streaming output also needs care: if partial content has already been pushed to the user, do not silently retry mid-stream, or the user will see duplicated or garbled text.
