High-Availability Architecture and Incident Response for Large Language Model Services
This guide explains how to investigate and mitigate large-scale access failures in LLM services. It covers symptom classification, weighted capacity planning, layered rate limiting, circuit breakers, graceful degradation, fault isolation, safe client retries, observability, external health checks, incident communication, and post-incident reviews.
1. Background: Why Access Failures Require a Dedicated Review
A large-scale online LLM service may occasionally experience widespread access failures. Users may see messages such as “Server busy” or “Check your network and try again,” while independent testing may confirm that the issue is real. During such incidents, public statements from the service provider strongly influence how the failure is understood. It is therefore important to distinguish confirmed observations from unverified explanations.
1.1 Confirmed Symptoms
- Users experience failed requests, unresponsive pages, or interrupted conversations.
- The same error message may be displayed even when the underlying causes are completely different.
- The issue persists over a period of time rather than appearing as a brief fluctuation.
1.2 Unverified Causes
Claims such as “too many users,” “insufficient compute capacity,” “architecture and cost constraints,” or “a network attack” are often third-party speculation. Until the service provider publishes a technical review, these claims should not be treated as conclusions.
For engineering teams, a more effective approach is to break the incident into verifiable layers and investigate each one systematically rather than immediately adopting a single assumption.
2. Interpreting Failure Symptoms by Layer
The same “service busy” message can originate from the network, access, application, or model inference layer. Identifying the layer first helps determine the appropriate response.
| Symptom | Common Layer | Typical Signals | Response Direction |
|---|---|---|---|
| “Check your network” message | Client or transport path | Connection timeouts, DNS resolution failures | Inspect the network path and validate connectivity from multiple regions |
| HTTP 429 or 503 responses | Access layer, rate limiting, or overload protection | Concentrated status codes, increasing queue depth | Enable rate limiting and activate graceful degradation |
| Very slow responses followed by failure | Inference service or downstream dependency | Rising P99 latency and timeout rates | Trip downstream circuit breakers and shorten request context |
| Some users remain unaffected | Region, tenant, or shard | Errors concentrated in specific regions or accounts | Shift traffic and isolate the affected shard |
The purpose of layered analysis is to let the data guide the investigation. Each layer should have independent metrics so that teams can quickly determine where the failure is occurring.
3. Capacity Planning and Traffic Governance
3.1 Capacity Is Not a Static Number
LLM request costs can vary significantly. A short question-and-answer interaction may consume several times fewer resources than a long-context generation request. Capacity planning should therefore be based on weighted request volume rather than raw request counts.
- Assign a cost weight based on input length, output length, and model specification.
- Reserve sufficient peak capacity and include the scaling lead time in planning.
- Measure cold-start and warm-up costs during load testing, because scaling takes time and initialization also consumes resources.
3.2 Layered Rate Limiting
Rate limits should be configured at multiple levels to avoid the weaknesses of relying on a single threshold.
- The access layer limits total system traffic to protect backend services from overload.
- The tenant layer limits each customer’s quota so that one customer cannot affect the entire service.
- The user layer limits request frequency within an individual session.
- The API layer applies separate limits to high-cost endpoints.
A token bucket is a common implementation pattern. The following values are examples and must be adjusted according to actual capacity.
class TokenBucket:capacity = 100 # Example bucket capacityrefill_rate = 20 # Example number of tokens added per secondfunction allow(request_cost):refill()if tokens >= request_cost:tokens -= request_costreturn ALLOWreturn REJECT_WITH_RETRY_AFTERfunction refill():now = current_time()tokens = min(capacity, tokens + (now - last) * refill_rate)last = now
Rejected requests should include a clear retry delay rather than returning only a generic error. This allows clients to back off according to a defined rule and reduces unnecessary traffic.
4. Circuit Breaking, Graceful Degradation, and Isolation
4.1 The Three Circuit Breaker States
A circuit breaker prevents continuous calls to a failing dependency. It has three states:
- Closed: Requests pass normally while failures are counted.
- Open: Requests bypass the downstream service and use the fallback path.
- Half-open: A small number of probe requests are allowed. The circuit closes if they succeed and opens again if they fail.
state = CLOSEDfailure_count = 0function call(fn):if state == OPEN:if now - opened_at < cool_down:return fallback()state = HALF_OPENtry:result = fn()on_success()return resultexcept error:on_failure()return fallback()function on_success():failure_count = 0state = CLOSEDfunction on_failure():failure_count += 1if state == HALF_OPEN or failure_count >= threshold:state = OPENopened_at = now
4.2 Graceful Degradation
The principle of degradation is to keep core functionality available while temporarily suspending nonessential features. Common approaches include:
- Temporarily disable suggestions, recommendations, and other auxiliary features while preserving core question answering.
- Reduce the maximum supported context length to lower the cost of individual inference requests.
- Return an estimated wait time for queued requests instead of keeping users waiting indefinitely.
- Move non-real-time tasks to an asynchronous queue.
4.3 Fault Isolation
Separate business lines should use independent resource pools. If all requests share the same inference instances, a class of high-cost requests can slow down the entire user base. Dividing resource pools by business line or tenant limits failures to a smaller scope.
5. Client Retry Strategies
Client retries are a frequently overlooked source of failure amplification. When many clients retry synchronously, they can create a retry storm that places additional pressure on an already overloaded service.
5.1 Backoff and Jitter
Retries should use exponential backoff with random jitter.
function call_with_retry(request, max_attempts = 4):for attempt in 1..max_attempts:response = send(request)if response.ok:return responseif not is_retryable(response):raise errorif retry_budget.exhausted():raise errordelay = min(max_delay, base * 2^(attempt - 1))sleep(random(0, delay)) # Full jitterraise error
5.2 Which Errors Are Retryable?
- Usually retryable: Timeouts, 429 responses, and 503 responses that indicate temporary overload.
- Should not be retried: 400, 401, and 403 responses that indicate an invalid request or insufficient authorization.
5.3 Idempotency
Retries for create-type requests can generate duplicate tasks. Each request should include an idempotency key that the server uses for deduplication. Clients should also define a retry budget, such as limiting retries to a specific proportion of total requests, so that retries do not overwhelm the service themselves.
6. Health Checks and Observability
6.1 Key Metrics
- Request success rate, segmented by API, tenant, and region.
- Latency percentiles, with particular attention to P95 and P99.
- Queue depth and queue wait time.
- Resource utilization and error distribution across inference instances.
Averages can hide important problems. Long-tail latency often reveals an issue earlier, so percentile-based monitoring should take priority.
6.2 External Probes
Internal metrics alone cannot fully represent the user experience. Synthetic probes should run regularly from multiple regions and network environments, simulating realistic conversation flows.
If internal metrics appear normal while external probes fail, the problem is often located in the network path or access layer.
6.3 Alert Design
Alerts should consider both duration and impact scope to avoid excessive noise from isolated fluctuations. For example, a critical alert might require the success rate to remain below a threshold for five consecutive minutes while affecting more than a defined proportion of users.
Thresholds should be established using historical data rather than copied from another system.
7. Incident Communication and Post-Incident Review
7.1 External Communication
During an incident, the status page should be updated promptly and should distinguish between confirmed information and information under investigation.
When the cause has not been verified, the service provider should not make a specific attribution. Vague statements can encourage speculation, while unverified speculation can easily be repeated as fact.
7.2 Post-Incident Review Process
An effective review should include:
- Timeline: Record each stage, including detection, response, mitigation, and recovery.
- Impact scope: Describe the affected features, regions, and proportion of users.
- Root cause: Confirm conclusions using evidence and clearly mark areas where evidence is insufficient.
- Improvements: Assign an owner and completion date to every action item.
- Validation method: Explain how the team will verify that each improvement is effective.
8. Implementation Checklist
- Is capacity planned using weighted request costs, with sufficient peak headroom?
- Are rate limits configured separately at the access, tenant, and user levels?
- Are circuit breakers configured for downstream dependencies, with defined fallback behavior?
- Do clients implement exponential backoff, jitter, and retry budgets?
- Do create-type APIs provide idempotency protection?
- Are latency percentiles monitored, with external probes running from multiple regions?
- Is there a defined process for status-page updates and a standardized post-incident review template?
High availability cannot be achieved through a single technology or mechanism. It depends on the combined design of capacity, traffic management, fault isolation, client behavior, and incident communication. When every layer is clearly designed, the service is far more likely to remain controllable during failures.
