High Availability and Disaster Recovery Practices After a Major LLM Service Outage
A large language model outage can disrupt documents, code generation, and automated pipelines that depend on continuous AI service. This article breaks down common root causes of AI service downtime, then covers high availability architecture patterns, client-side fault tolerance, observability and alerting, capacity planning, and incident response, with practical code examples and a readiness checklist you can apply to your own systems.
1. Incident Review: Why AI Service Outages Hurt So Much
A major LLM service experienced a large-scale disruption on a weekday afternoon. The web app stalled while loading, messages failed to send, the public API kept returning errors, and some accounts could only get intermittent access. The surface symptom was “the service won’t load,” but the real damage to users is often far greater.
AI services are now embedded in production workflows such as document processing, code writing, and data analysis. These tasks tend to be long-running and depend on context continuity. A single outage can lead to:
- In-progress document parsing being terminated, with intermediate results lost.
- Code generation tasks failing midway, forcing developers to reassemble prompts and context.
- API-integrated automation pipelines failing end-to-end, causing downstream backlogs or data inconsistency.
- Paying users losing work progress, eroding trust in the service.
Availability, recovery time, and data integrity together determine whether an AI service can be trusted in critical business workflows.
2. Failure Symptoms and Common Root Causes
Based on public reports, this type of outage typically shows four characteristics: page-level loading stalls, message send failures at the interaction layer, persistent API errors, and intermittent availability. These symptoms often appear together, which suggests the problem lies in shared infrastructure or the core scheduling layer rather than a single frontend component.
Drawing on industry experience, common causes of AI service outages include:
1. Compute scheduling pressure
Model inference depends on large numbers of accelerator cards. When request volume approaches cluster capacity, the scheduler queues or rejects new requests, triggering timeouts and backlog buildup.
2. Traffic spikes combined with new releases
When a new model or feature launches, demand is hard to predict accurately. Without admission control, traffic peaks can overwhelm insufficiently warmed-up instances.
3. Misconfigured rate limiting and quotas
Rate limit thresholds set too low, or bugs in quota accounting, can incorrectly block legitimate requests. These look like service failures but are actually policy-layer defects.
4. Cascading failures across dependencies
Authentication, session storage, billing, and model services depend on one another. If any component slows down, timeouts and retries can amplify it into a global outage—known as a cascading failure or “thundering herd” effect.
5. Lack of fault isolation
If the web app, mobile clients, and developer API share the same entry point and resource pool, a single component failure spreads to every client.
Understanding these causes helps you build defenses at the architecture design stage instead of reacting after an incident.
3. High Availability Architecture Design
3.1 Multi-Availability-Zone and Active-Active Deployment
Distribute service instances across multiple independent availability zones so that a physical failure or network issue in any single zone cannot take down the whole service. Replicate core state data synchronously to a standby region and rehearse failover regularly. Failover requires clear primary/standby election criteria to avoid dual-writer conflicts.
3.2 Elastic Compute Pools
The goal of an elastic compute pool is to scale out quickly during peaks and reclaim resources during troughs. Three things matter:
- Reserve a baseline of capacity so there’s a buffer when sudden traffic arrives.
- Use scaling signals that reflect real pressure—queue length, time-to-first-token—rather than just average CPU utilization.
- Warm up new instances before routing traffic: load model weights and pass health checks first.
3.3 Layered Rate Limiting and Admission Control
Rate limiting should never be a single gate. Design it in layers:
- At the ingress layer, limit per-user request rates to prevent individual clients from exhausting resources.
- At the service layer, dynamically adjust concurrency limits based on remaining compute.
- At the business layer, route expensive requests (e.g., very long contexts) to dedicated queues.
When the system is overloaded, prioritize paid, core use cases, and return clear queuing messages for non-critical requests instead of letting them time out silently.
3.4 Circuit Breaking and Graceful Degradation
A circuit breaker opens when downstream failure rates exceed a threshold, rejecting subsequent requests outright to give the downstream time to recover. Degradation means turning off non-core features when resources are scarce—for example, pausing add-on analysis modules while keeping basic chat working.
Here is a simplified circuit breaker illustrating the state transitions:
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_request(self):if self.opened_at is None:return True# After the circuit opens, allow a trial request once the reset timeout has passedif time.time() - self.opened_at >= self.reset_timeout:return Truereturn Falsedef record_success(self):self.failures = 0self.opened_at = Nonedef record_failure(self):self.failures += 1if self.failures >= self.failure_threshold:self.opened_at = time.time()
Production systems also need a half-open state, concurrent probing, and metrics reporting—this example only shows the core idea.
4. Client-Side and Developer Fault Tolerance
Server-side high availability only pays off when clients handle failures gracefully. The following practices can significantly reduce outage damage.
4.1 Sensible Timeouts and Retries
Retries should use exponential backoff with random jitter so that large numbers of clients don’t retry simultaneously and cause a second wave of load. Only retry transient errors such as timeouts, connection failures, and rate-limit responses; fail immediately on parameter or authorization errors.
import randomimport timeclass TransientError(Exception):"""Represents a temporary error that can be retried."""def call_with_backoff(func, max_retries=5, base=0.5, cap=20.0):for attempt in range(max_retries):try:return func()except TransientError:if attempt == max_retries - 1:raise# Exponential backoff with random jitterupper = min(cap, base * (2 ** attempt))time.sleep(random.uniform(0, upper))
4.2 Request Idempotency
A retried request should not produce duplicate side effects, such as double billing or duplicate writes. Assign a unique identifier to each task so the server can detect whether the request was already processed—this is the standard approach to idempotency.
4.3 Checkpointing for Long-Running Tasks
For long tasks like document parsing or batch code generation, persist intermediate progress regularly. After an interruption, the task can resume from the latest checkpoint instead of starting over.
import jsonimport osdef save_checkpoint(task_id, state, path_dir="checkpoints"):os.makedirs(path_dir, exist_ok=True)file_path = os.path.join(path_dir, f"{task_id}.json")with open(file_path, "w", encoding="utf-8") as f:json.dump(state, f, ensure_ascii=False)def load_checkpoint(task_id, path_dir="checkpoints"):file_path = os.path.join(path_dir, f"{task_id}.json")if not os.path.exists(file_path):return Nonewith open(file_path, "r", encoding="utf-8") as f:return json.load(f)
In production, checkpoints are typically stored in object storage or a database; local files are only suitable for single-machine debugging.
4.4 Degradation Messaging and Session Protection
Clients should clearly distinguish between “request failed” and “service busy,” and preserve user input in the UI. Autosaved drafts and cached session state both reduce repetitive work for users.
5. Observability and Alerting
Without reliable observability data, both detecting and diagnosing outages slow down. At minimum, cover these metric categories:
- Availability metrics: request success rate, error rates broken down by entry point and region.
- Performance metrics: time to first token, tail latency (P99), queueing time.
- Resource metrics: accelerator utilization, GPU memory usage, queue depth.
- Business metrics: session interruption rate, task completion rate, per-user quota consumption.
- Error distribution: aggregated by error code, separating transient from permanent errors.
Beyond passive collection, deploy synthetic monitoring: scheduled probes that simulate real user journeys against both the web app and the API. Synthetic monitoring can raise an early warning before real traffic is noticeably affected.
Alerts should be tiered. For example, a success rate below a threshold sustained for several minutes triggers a critical alert that pages the on-call engineer, while minor fluctuations in a single region only get logged—avoiding alert fatigue.
6. Capacity Planning and Quota Governance
The core of capacity planning is combining historical peaks, business growth, and upcoming feature launches into one picture. Concrete practices include:
- Analyze weekly and monthly traffic curves to identify recurring peak periods.
- Load-test before major releases, and ramp up gradually during canary rollout.
- Reserve dedicated capacity or priority lanes for key customers.
- Reconcile the quota accounting module regularly—compare counts against actual consumption to prevent statistical drift from causing false blocking.
Quota governance matters too. Quota rules should be transparent to users, with advance notice of changes, so users aren’t suddenly throttled without knowing why.
7. Incident Response and Postmortems
After an outage, response speed and communication quality directly affect user trust. A recommended workflow:
- Confirm and classify: The on-call engineer confirms the incident within a defined time window and assigns severity based on impact scope.
- Public communication: Publish a status page update covering impact scope, current progress, and estimated recovery time. If no ETA is available yet, state why and when the next update will come.
- Mitigation and recovery: First restore baseline service through rate limiting, degradation, or failing over to a standby region; root cause analysis comes after.
- Postmortem: Write a postmortem document afterward, using a blameless format that focuses on process and system defects rather than individual blame.
- Follow-through: Every improvement action needs an owner and a deadline, tracked through subsequent iterations.
The longer the official silence, the more speculation grows. Frequent updates sustain user confidence better than one perfect final report.
8. Readiness Checklist
Teams can use this checklist to assess their resilience:
- Do you have at least two independent availability zones, with a real failover drill completed?
- Do you have layered rate limiting, with thresholds validated by load testing?
- Do retries implement exponential backoff with jitter for transient errors?
- Do critical write operations have idempotency mechanisms?
- Do long-running tasks support checkpointing and resumption?
- Is synthetic monitoring deployed, with critical vs. normal alerts separated?
- Is quota accounting reconciled on a regular schedule?
- Is there a standard process for status page updates and incident communication?
- Does every incident produce a postmortem with trackable improvements?
Availability work has no finish line. Every outage is a chance to validate your architecture and processes—and turning postmortem findings into concrete improvements is what makes a system steadily more reliable as it scales.
