LLM Service Outage: High-Availability Architecture and Failure Response Practices
This article examines a widespread outage of a large language model service from the user side and classifies the symptoms into connectivity, business, and state issues. It reviews common root causes—compute capacity limits, gateway rate limiting, quota and metering failures, cascading failures, and change-induced regressions—and outlines server-side high-availability design covering capacity planning, elastic scaling, multi-level degradation, rate limiting, circuit breaking, bulkhead isolation, multi-AZ deployment, backup routing, canary releases, rollback, and observability. It also presents client-side fault tolerance practices such as retry classification, exponential backoff with jitter, client circuit breakers, timeouts, and idempotency, and highlights the importance of task-state persistence for long-running jobs.
1. Deconstructing a Multi-Endpoint Outage from the User Side
Public reports indicate that a large language model service experienced widespread anomalies on a weekday afternoon. Web pages stalled during loading, and messages received no response after being sent. Mobile sessions disconnected mid-conversation. The developer-facing API continued to return error codes, preventing automated workflows that depended on it from completing. A small number of accounts could access the service intermittently, but with a very low success rate. Paid users were also affected, and long-running tasks such as document parsing and code generation were forced to terminate.
One important signal in this type of incident is that multiple endpoints failed at the same time. This suggests that the problem was most likely in the shared backend dependency layer used by all endpoints—such as the inference cluster, gateway, authentication service, or quota metering system—rather than a defect in a single client. Intermittent availability usually means the system is overloaded or partially failed, rather than completely stopped. During troubleshooting, the first step should be to determine which layer the failure is in, and then decide on the response.
The symptoms seen by users and developers can be grouped into three categories:
- Connectivity-layer issues: Pages or APIs do not respond for a long time and eventually time out.
- Business-layer issues: Requests reach the service, but return a uniform error, or tasks are interrupted during processing.
- State-layer issues: Sessions, task progress, or usage statistics become inconsistent, and users cannot confirm whether completed work has been saved.
The third category often damages user trust more than the outage itself. Therefore, disaster recovery design must also cover the persistence of task state.
2. Common Root Cause Categories
Failures in large language model services are usually caused by the following categories of issues.
2.1 Compute Capacity Bottlenecks
A single large language model inference request consumes considerable resources, and output length is not fixed. When instantaneous request volume exceeds the cluster’s capacity limit, requests queue in the scheduling queue. Once queueing time exceeds the client timeout threshold, the request appears as a failure. If scaling cannot keep up during traffic peaks, this problem escalates quickly.
2.2 Gateway Rate Limiting Triggered
To protect the backend, ingress gateways usually have rate limiting policies. If rate limit thresholds are set based on historical averages, they may take effect too early during sudden traffic spikes and return a large number of rate-limit errors. To users, these errors are difficult to distinguish from a service outage.
2.3 Quota and Metering Service Failures
Every request passes through authentication, quota checks, and usage metering. If the metering service experiences latency or data anomalies, it may incorrectly determine that quota is insufficient and reject requests that are actually valid. The characteristic of this type of failure is that the service process itself is healthy, but all business results fail.
2.4 Cascading Failures
When one downstream component slows down, it can exhaust threads or connection pools in upstream services. Upstream services then cannot respond to other requests in time, and the failure spreads along the call chain. Cascading failures are one of the common causes of simultaneous errors across multiple endpoints.
2.5 Regressions Introduced by Changes
Version releases, configuration adjustments, and model switches can all introduce new problems. If canary releases and fast rollback mechanisms are missing after a change, the impact of a failure can expand to all users.
3. Server-Side Disaster Recovery Architecture Design
3.1 Capacity Planning and Elastic Scaling
The core of capacity planning is estimating the concurrent resources required at peak load. A practical estimation formula is as follows:
Required concurrency = peak request rate (QPS) × average duration per request (seconds) × redundancy factor
The following calculation is an example; the values are only for illustrating the method: with a peak of 500 QPS, an average duration of 2 seconds per request, and a redundancy factor of 1.3, the required concurrency is approximately 1300. The redundancy factor covers traffic fluctuations, node failures, and temporary capacity loss during releases.
On this basis, the following work should be done:
- Reserve fixed capacity for critical paths, and use preemptible elastic resource pools for batch and non-real-time tasks.
- Configure autoscaling policies based on queue length or concurrency utilization, rather than relying only on CPU metrics.
- Warm up newly scaled nodes to avoid cold-start latency fluctuations being misidentified as failures.
3.2 Multi-Level Degradation Strategy
The goal of degradation is to preserve core functions when resources are insufficient. Degradation levels should be defined in advance and executed automatically or semi-automatically when monitoring triggers them:
- Level 1 degradation: Disable non-core features such as recommendations, additional analysis, and historical data loading.
- Level 2 degradation: Shorten the maximum output length and limit the context size of a single request, reducing the resource consumption of each request.
- Level 3 degradation: Move non-real-time tasks into an asynchronous queue, return a task ID, and let users query the result later.
- Fallback strategy: Return cached results for requests that can be cached, and clearly label the source and freshness of the result.
Degradation actions must be communicated to users. Silent degradation makes users believe the feature is working normally, which can lead to incorrect decisions.
3.3 Rate Limiting, Circuit Breaking, and Bulkhead Isolation
Rate limiting controls the rate at which requests enter the system. The token bucket algorithm allows short bursts while limiting the long-term average rate. It is smoother than fixed-window counters and is suitable as a foundational algorithm for ingress rate limiting.
Circuit breaking is used to stop continuous calls to a failing dependency. A circuit breaker usually has three states:
- Closed: Requests are forwarded normally, and failure counts are tracked.
- Open: After the failure count exceeds a threshold, requests are rejected directly or routed to a degraded branch.
- Half-open: After a cooldown period, a small number of probe requests are allowed. If they succeed, the breaker returns to closed; if they fail, it opens again.
Bulkhead isolation separates resource pools for different workloads. Long-text processing tasks and real-time chat tasks use independent thread pools and queues, so a backlog in one type of task does not take down the other.
3.4 Multi-AZ Deployment and Backup Routing
A failure in a single availability zone can cause an overall outage. Core services should be deployed in at least two availability zones, with unhealthy nodes automatically removed through health checks. For model inference, backup routing can be designed: when the primary route is unavailable, low-priority requests can be switched to smaller but stable backup instances, and the user experience notes can inform users that the service is currently in degraded mode.
3.5 Canary Releases and Fast Rollback
Changes should be rolled out in batches by percentage, and each batch should be monitored for success rate, latency, and error code distribution. When anomalies occur, rollback should be completed within minutes, and rollback steps should be rehearsed in advance. Configuration changes and code changes both need to be included in the canary release process.
3.6 Observability and Alerting
Monitoring metrics should be designed around user experience, not only machine status. Common metrics include:
- Request success rate, broken down by endpoint, API, and error code.
- End-to-end latency percentiles, such as P95 and P99.
- Queue wait time and queue depth.
- Number of triggers for rate limiting, circuit breaking, and degradation.
- Latency and error rate of metering and quota services.
Alerts should be tiered. Failures with broad impact and long duration should directly notify on-call staff; short-lived fluctuations should only be logged to avoid alert fatigue. Teams can set service level objectives and use error budgets to decide whether to pause new feature releases.
4. Client-Side Fault Tolerance Practices
Server-side disaster recovery mechanisms cannot completely eliminate failures. Client systems that depend on the service also need fault tolerance design.
4.1 Distinguish Retryable and Non-Retryable Errors
Error type must be determined before retrying. Timeouts, connection interruptions, rate limiting (429), and temporary server errors (5xx) can usually be retried. Retrying parameter errors, authentication failures, and insufficient balance is meaningless; these should be returned immediately to the caller for handling.
4.2 Exponential Backoff and Random Jitter
Fixed-interval retries can cause a surge of simultaneous requests when the service recovers, creating a second impact. Exponential backoff with random jitter is recommended so that retries from different clients are spread out in time.
The following example demonstrates a retry wrapper with backoff:
import randomimport timeRETRYABLE_STATUS = {429, 500, 502, 503, 504}class ServiceError(Exception):def __init__(self, status_code, message=""):super().__init__(message)self.status_code = status_codedef call_with_retry(request_fn, max_attempts=5, base_delay=0.5, max_delay=20.0):"""Retry a request with exponential backoff and random jitter. request_fn is a request function with no arguments."""for attempt in range(1, max_attempts + 1):try:return request_fn()except (ServiceError, TimeoutError) as err:status = getattr(err, "status_code", None)retryable = isinstance(err, TimeoutError) or status in RETRYABLE_STATUSif not retryable or attempt == max_attempts:raise# Take a random value in [0, backoff upper bound] to spread retry times across clientsbackoff = min(max_delay, base_delay * (2 ** (attempt - 1)))time.sleep(random.uniform(0, backoff))
4.3 Client-Side Circuit Breaking
When the service continues to fail, continuing to send requests from the client only wastes resources and slows down the client itself. The following circuit breaker pauses calls after the failure count exceeds a threshold, then allows probe requests after a cooldown period:
import timeclass CircuitBreaker:CLOSED = "closed"OPEN = "open"HALF_OPEN = "half_open"def __init__(self, failure_threshold=5, recovery_timeout=30.0):self.failure_threshold = failure_thresholdself.recovery_timeout = recovery_timeoutself.state = self.CLOSEDself.failures = 0self.opened_at = 0.0def allow_request(self):if self.state == self.OPEN:if time.monotonic() - self.opened_at >= self.recovery_timeout:self.state = self.HALF_OPENreturn Truereturn Falsereturn Truedef record_success(self):self.failures = 0self.state = self.CLOSEDdef record_failure(self):self.failures += 1if self.state == self.HALF_OPEN or self.failures >= self.failure_threshold:self.state = self.OPENself.opened_at = time.monotonic()def answer_with_fallback(prompt, breaker, primary, fallback):"""Switch to fallback logic when the circuit breaker is open or the primary call fails."""if not breaker.allow_request():return fallback(prompt)try:result = primary(prompt)breaker.record_success()return resultexcept Exception:breaker.record_failure()return fallback(prompt)
Fallback logic can be a local cache, queueing, switching to another available service, or showing a clear message to the user. Which option to choose depends on the business requirements for latency and accuracy.
4.4 Timeouts and Idempotency
Timeout values should be set according to the business workload. Interactive chat should have a relatively short timeout so users can notice problems promptly; long document processing should have a separately configured timeout and poll for results as an asynchronous task.
Retries can cause the same request to be executed multiple times. For operations with side effects, such as creating tasks or deducting quota, an idempotency key should be included so the server can identify duplicate requests.
5. Breakpoint Recovery for Long-Running Tasks
Long-running tasks such as document parsing, batch translation, and code generation are the most vulnerable to interruptions. When a single failure terminates an entire task, the impact extends beyond the outage itself and can leave users unable to confirm whether completed work has been saved. This is why task-state persistence must be part of the disaster recovery design.
