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.

    1. class TokenBucket:
    2. capacity = 100 # Example bucket capacity
    3. refill_rate = 20 # Example number of tokens added per second
    4. function allow(request_cost):
    5. refill()
    6. if tokens >= request_cost:
    7. tokens -= request_cost
    8. return ALLOW
    9. return REJECT_WITH_RETRY_AFTER
    10. function refill():
    11. now = current_time()
    12. tokens = min(capacity, tokens + (now - last) * refill_rate)
    13. 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.
    1. state = CLOSED
    2. failure_count = 0
    3. function call(fn):
    4. if state == OPEN:
    5. if now - opened_at < cool_down:
    6. return fallback()
    7. state = HALF_OPEN
    8. try:
    9. result = fn()
    10. on_success()
    11. return result
    12. except error:
    13. on_failure()
    14. return fallback()
    15. function on_success():
    16. failure_count = 0
    17. state = CLOSED
    18. function on_failure():
    19. failure_count += 1
    20. if state == HALF_OPEN or failure_count >= threshold:
    21. state = OPEN
    22. opened_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.

    1. function call_with_retry(request, max_attempts = 4):
    2. for attempt in 1..max_attempts:
    3. response = send(request)
    4. if response.ok:
    5. return response
    6. if not is_retryable(response):
    7. raise error
    8. if retry_budget.exhausted():
    9. raise error
    10. delay = min(max_delay, base * 2^(attempt - 1))
    11. sleep(random(0, delay)) # Full jitter
    12. raise 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:

    1. Timeline: Record each stage, including detection, response, mitigation, and recovery.
    2. Impact scope: Describe the affected features, regions, and proportion of users.
    3. Root cause: Confirm conclusions using evidence and clearly mark areas where evidence is insufficient.
    4. Improvements: Assign an owner and completion date to every action item.
    5. 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.