LLM Service Outages: Five Availability Design Practices for Production Systems
A recent outage affected multiple LLM versions and client entry points, highlighting common-cause, recurring, and cascading failure patterns. This article explains why such incidents can spread across an entire stack and outlines five practical availability design practices: dependency classification, timeout and retry controls, circuit breaking and degradation, multi-path disaster recovery with an abstraction layer, and monitoring, alerting, and drills. It also covers incident response flow and post-incident metrics such as MTTD, MTTR, and SLO attainment.
Event Characteristics and Lessons
In a recent incident, multiple main model versions began returning inference errors at the same time, and the disruption lasted nearly three hours. Web applications, APIs, command-line coding assistants, and collaboration tools also became unavailable in succession. Only the console and a dedicated entry point for government-facing scenarios remained available. The service then fluctuated repeatedly between repair, renewed failure, and repair again. Shortly after midnight the next day, the login and authentication system also had an anomaly, affecting subscription users’ web client and coding assistant for about six minutes.
This type of incident has three notable characteristics. First, the failure had a common cause. Multiple models and multiple entry points failed at the same time, indicating that they shared an underlying dependency, such as an inference cluster, access gateway, or authentication service. Second, the failure was recurrent. The service still relapsed after an official fix was announced, which usually means the root cause was not fully identified or the fix itself introduced a new regression. Third, the failure was cascading. Authentication and gateway problems can spread impact from the backend to every frontend entry point.
For users, the conclusion is direct. If a business relies only on a single external AI service, that service’s availability becomes the upper limit of the business’s availability.
Why Failures Affect the Entire Technology Stack
- Shared underlying layers. Different model versions and different clients often share access gateways, quota systems, and identity authentication. If any layer has a problem, upper-layer entry points are affected at the same time.
- Retry amplification. When clients time out and retry immediately, request volume can multiply. This slows down a service that is already under pressure and also slows recovery.
- Recovery-period surge. When a service just recovers, backlogged requests rush in at once, caches are not warmed up, capacity is insufficient, and failures can easily be triggered again. This is one common reason for “fixed, then broken again.”
- Hidden dependency chains. Internal tools, automation workflows, and plugins may depend on the same service without the team knowing. When an incident occurs, the impact is often much broader than expected.
Five Availability Design Practices
Practice 1: Map Dependencies and Classify Them
First, inventory all points where external AI services are called, then classify them into three levels by business impact:
- Core: directly affects online transactions or external services and must have a degradation plan.
- Important: affects internal efficiency and can be queued or delayed.
- Auxiliary: convenience features that can be disabled directly during an outage.
After classification, the team can determine how much disaster recovery resource each level requires.
Practice 2: Timeouts, Retries, and Backoff
Retries are the most error-prone part. The correct approach is to set explicit timeouts, limit the number of retries, and use exponential backoff with random jitter to prevent a large number of requests from retrying at the same moment.
import randomimport timedef call_with_backoff(func, max_retries=4, base_delay=0.5, timeout=10):for attempt in range(max_retries + 1):try:return func(timeout=timeout)except (TimeoutError, ConnectionError):if attempt == max_retries:raise# Exponential backoff with random jitterdelay = base_delay * (2 ** attempt)time.sleep(delay + random.uniform(0, delay * 0.3))
Retry only idempotent requests. For write operations that produce side effects, confirm whether the original request has already taken effect before retrying; otherwise, duplicate submission may occur.
Practice 3: Circuit Breaking and Degradation
When the error rate exceeds a threshold, actively stop calling rather than continuing to wait for failures. A circuit breaker usually has three states: closed (normal calls), open (reject calls directly and use degradation logic), and half-open (allow a small number of probe requests and recover if they succeed).
import timeclass CircuitBreaker:def __init__(self, failure_threshold=5, reset_timeout=30):self.failure_threshold = failure_thresholdself.reset_timeout = reset_timeoutself.failures = 0self.opened_at = Nonedef allow(self):if self.opened_at is None:return True# After the cooldown period, enter half-open state and allow probe requestsreturn time.time() - self.opened_at >= self.reset_timeoutdef record(self, success):if success:self.failures = 0self.opened_at = Noneelse:self.failures += 1if self.failures >= self.failure_threshold:self.opened_at = time.time()
Degradation plans need to be designed in advance. Common approaches include returning cached results, switching to a rules engine, or telling users to try again later.
Practice 4: Multi-Path Disaster Recovery and an Abstraction Layer
If a business depends deeply on AI capabilities, it can build a unified model invocation abstraction layer within the application and encapsulate each service’s interface details in adapters. When the primary service is abnormal, the adapter can switch to a backup service or a local small-scale model.
A switching plan needs to address three points. First, the output quality of the backup option may differ, so its effectiveness must be evaluated before launch. Second, different services may have different data processing terms, regional requirements, and compliance boundaries, so approval must be completed before switching. Third, the switching logic itself must be drilled; otherwise, it may also fail when an incident occurs.
Practice 5: Monitoring, Alerting, and Drills
At a minimum, monitor the following metrics: request success rate, first-response latency, timeout rate, retry count, circuit breaker state, and actual call volume for each business line. Alerts should be triggered based on trends and duration rather than a single fluctuation to reduce false positives.
Conduct at least one failure drill each quarter, actively simulating dependency unavailability to verify whether circuit breaking, degradation, and switching work as expected.
Operational Process During an Incident
Technical measures need to be combined with clear processes to be effective. Incident handling should proceed through the following steps:
- Identify: determine whether the problem is in the local system or an external service, avoiding wasted investigation time on the local system.
- Classify: determine the response level based on impact, prioritizing core business.
- Degrade: enable the playbook to keep core functions available.
- Notify: update internal teams and affected users on the status, including known impact and the expected handling approach.
- Switch back: after the service recovers, do not switch back to the primary service immediately. Set an observation window, for example, waiting until metrics remain stable for tens of minutes before gradually switching back. This step can effectively avoid repeated flapping after the service appears to have recovered.
Post-Incident Review and Improvement Metrics
After each incident, a post-incident report should be produced, focusing on the following metrics:
- Mean time to detect (MTTD): the time from failure occurrence to team awareness.
- Mean time to recovery (MTTR): the time from awareness to business recovery.
- Service-level objective (SLO) and actual attainment.
- Actual effectiveness of the degradation plan.
During the review, distinguish the root cause, trigger factors, and amplifying factors. For incidents caused by external dependencies, the review should focus on improving dependency isolation and degradation capabilities, and update the classification table, timeout configuration, and switching playbook accordingly.
Conclusion
AI services have entered many production systems, and their stability directly affects business stability. In the face of concentrated outages, rather than predicting the timing of every failure, it is better to complete dependency classification, timeout and retry control, circuit breaking and degradation, disaster recovery switching, and regular drills in advance. If these five areas are done well, the team can keep the impact within an acceptable range the next time an external service is interrupted.
