High Availability for Large Language Model Services: Handling Large-Scale Outages

    Large-scale LLM outages hit both end users and developers, and they are becoming hard to avoid as demand grows. This article breaks a failure into three layers—access, service, and inference—and traces the shared request path so teams can quickly tell whether the fault is client-side or server-side. It covers reading HTTP and business error codes correctly, retrying with exponential backoff and full jitter to avoid retry storms, and building checkpoint-based resume for long document-parsing and code-generation tasks with idempotency keys. On the provider side, it looks at elastic compute pools, tiered overload protection, fault-domain isolation, and observability. It closes with measurable continuity targets—SLIs, error budgets, chaos drills, and a vendor-selection checklist—so that reliability becomes an engineering capability rather than an after-the-fact fix.

    In early 2026, on an ordinary weekday afternoon, a large LLM service platform went down at scale. On the user side it showed up as pages that loaded for a long time, messages that failed to send repeatedly, and conversations that were terminated mid-way. On the developer side it showed up as APIs that kept returning errors and client scripts that failed en masse during batch jobs. In document-parsing and code-generation tasks running at the same time, the loss was not just a single response but also the waiting time and context already invested. Incidents like this are not rare. Over the past year, multiple LLM platforms have experienced periodic disruptions during model iterations or traffic peaks. Common triggers include request floods that exceed compute capacity, defects introduced by release changes, and shared-dependency failures.

    For developers and enterprises that rely on LLM services, the more practical question than “which day will it go down” is:

    • When a failure happens, how do you quickly tell whether it is a network problem or a server-side fault;
    • For failed long-text or code-generation tasks, how do you resume them rather than redo them;
    • When building or buying an LLM service, how do you protect service continuity at both the architecture and the contract level.

    Starting from the failure propagation path, this article gives end-to-end, actionable methods.

    1. See the failure clearly: a three-layer model and a shared path

    The most effective way to gauge the scope of a failure is to break it into three layers and find the chain shared across all clients.

    Access layer

    Behind entry points such as the web client, mobile app, and IDE plugins there is usually the same public API gateway. The gateway handles authentication, rate limiting, routing, and long-connection management in one place. A configuration error, a certificate problem, or overload here can make every client report errors at the same time.

    Service layer

    Middle-tier services handle conversation orchestration, context management, tool invocation, file parsing, content moderation, and so on. They decide which model handles a request, how much context to allocate, and how streaming output is returned. Code may keep generating while messages never arrive—this usually means the streaming channel broke in this layer.

    Inference layer

    Model weights, the inference framework, the GPU/NPU compute pool, the request scheduler, and the batch-processing system. Memory fragmentation, poor batching parameters, burst traffic exceeding quota, and node failures all get amplified into global unavailability here.

    The three layers are connected by a single shared path: load balancing → authentication and rate limiting → queue scheduling → inference nodes → streaming return → session storage.

    Take the example of the web client, mobile app, and API all reporting errors at once. The most likely fault point is the upstream shared segment of this path, not any one client:

    • If only the web client misbehaves, consider client-side factors first, such as front-end resources or long-connection proxy timeouts;
    • If all clients fail at the same time, the fault most likely lies in the gateway, authentication, queue scheduling, or the compute pool itself;
    • If one model keeps failing while others work fine, it is a model-level or cluster-level isolation problem.

    Also watch for errors appearing on the paid channel and the free channel at the same time, because the two often share the same underlying scheduler. This means the failure has already punched through priority isolation. For enterprise customers with SLA requirements, this is exactly the signal to question the provider’s isolation design.

    Diagnostic quick-reference matrix

    (Locate the fault fast along two dimensions: “can you get a response” and “can generation complete”)

    Symptom High-probability fault point First action
    All clients fail at the connect or auth stage, and the response is very fast Gateway, auth service Switch to a backup entry point, extend backoff
    Requests enter the queue and return an error after a timeout Scheduler, compute pool Rate-limit and degrade, defer retries
    The first chunk returns but the stream breaks midway Streaming channel, session storage Resume from the checkpoint, resend only the missing part
    One model keeps failing while others are fine Model-level or cluster-level fault Switch routing by model
    Complex requests fail while simple ones succeed Context too long, oversubscription, OOM Compress the context, split the task

    2. Reading error codes: the developer’s first line of defense

    During an outage, the first things a developer hits are HTTP status codes and business error codes. But the two are not always equivalent. Common cases include:

    • HTTP 200 with an error in the response body;
    • gateway errors and server errors sharing the same status code;
    • for anti-enumeration reasons, auth-related errors collapsed into one generic code, mixed in with rate limiting.

    Judging whether to retry purely by status code easily leads to wrong decisions. The right approach is to classify first, then decide:

    1. Retryable: connection resets, timeouts, 429, 502, 503, 504. Caused by high load or transient faults; usually recoverable after backoff.
    2. Non-retryable: 400, 401, 403, 422. These are request or credential problems; retrying only amplifies traffic.
    3. Ambiguous: generic error codes related to authentication. During an outage it could be “the credential really expired” or “the auth service as a whole is down.” Send one very lightweight probe request first to tell them apart; if every request returns the same error, treat it as a server-side failure.

    The sample code below is a generic implementation and does not depend on any specific vendor’s API:

    1. import random
    2. import time
    3. # Backoff parameters
    4. BASE_DELAY = 1.0 # Initial backoff in seconds
    5. MAX_DELAY = 32.0 # Upper bound for a single backoff
    6. MAX_RETRIES = 6
    7. # Retryable: network errors and transient gateway/server errors
    8. RETRYABLE = {408, 425, 429, 500, 502, 503, 504}
    9. # Ambiguous auth errors: use a probe request to tell "credential issue" from "server-side failure"
    10. AMBIGUOUS = {401, 403}
    11. def should_retry(exc, server_wide: bool) -> bool:
    12. if isinstance(exc, (TimeoutError, ConnectionError)):
    13. return True
    14. if exc.status in RETRYABLE:
    15. return True
    16. if exc.status in AMBIGUOUS:
    17. # Treat a full outage as a server-side failure; only this request affected => credential issue
    18. return server_wide
    19. return False
    20. def call_with_backoff(do_request, is_server_wide, max_retries=MAX_RETRIES):
    21. for attempt in range(max_retries + 1):
    22. try:
    23. return do_request()
    24. except Exception as exc:
    25. if attempt == max_retries or not should_retry(exc, is_server_wide()):
    26. raise
    27. # Exponential backoff with full jitter, to avoid clients retrying in sync and creating a second flood
    28. delay = min(MAX_DELAY, BASE_DELAY * 2 ** attempt)
    29. time.sleep(random.uniform(0, delay))
    30. raise RuntimeError("unreachable")

    A few key engineering details:

    • Retry budget: allow only a limited number of retries per business call, and keep total time under the upstream timeout. Otherwise, during an outage the client piles up several times more requests than usual—a classic “retry storm.”
    • Full jitter: if many clients retry at fixed intervals, they hit the already-overloaded server at the same moment again.
    • Separate read requests from streaming requests: a failed non-streaming request can simply be resent; a streaming request has already consumed part of the generation, so it must be paired with checkpointed resume (see Section 3), otherwise you get duplicate billing and duplicate generation.
    • Surfacing error information: write the error code, request identifier, and retry count into business logs so you can reconcile and locate issues with the provider after recovery.

    3. Make long tasks resumable: checkpoint management for context and output

    LLM tasks—especially long-document parsing and code generation—are essentially a long accumulation of “partial results.” Once the connection breaks midway, the problem is not “send it once more” but how to recover the intermediate output already produced.

    Task layering and checkpoints

    Split the task into three stages: plan → execute → verify.

    • The planning stage produces a list of steps;
    • The execution stage generates segment by segment, step by step;
    • The verification stage aggregates the final output.

    Persist state after each stage completes—step number, input summary, existing output, parameters used. After reconnecting you can continue from the most recent checkpoint instead of starting over.

    Chunking and indexing long documents

    For documents larger than the context window, split on semantic boundaries (paragraphs, sections, code blocks) and build an index for each chunk, recording “chunk ID + content summary + status.” After reconnecting:

    1. Read the list of completed chunks;
    2. Continue from the incomplete ones;
    3. Do a final global-consistency merge.

    Sample code:

    1. import json, os
    2. class CheckpointStore:
    3. """File-based task checkpoint; in production, swap in object storage or a message queue"""
    4. def __init__(self, path: str):
    5. self.path = path
    6. def load(self):
    7. if not os.path.exists(self.path):
    8. return {"done": [], "results": {}}
    9. with open(self.path, "r", encoding="utf-8") as f:
    10. return json.load(f)
    11. def save(self, state):
    12. tmp = self.path + ".tmp"
    13. with open(tmp, "w", encoding="utf-8") as f:
    14. json.dump(state, f, ensure_ascii=False)
    15. os.replace(tmp, self.path) # Atomic replace, guards against crashing mid-write
    16. def run_long_task(chunks, call_model, store):
    17. state = store.load()
    18. for i, chunk in enumerate(chunks):
    19. key = f"chunk-{i}"
    20. if key in state["done"]:
    21. continue # Already done, skip
    22. result = call_model(chunk) # Includes retry with backoff
    23. state["results"][key] = result
    24. state["done"].append(key)
    25. store.save(state) # Persist after each chunk
    26. return merge(state["results"]) # Global merge

    Differentiated handling for code generation

    Code tasks have a higher cost of error tolerance. Recommendations:

    • Set checkpoints per file rather than per task, and use static checks (syntax parsing, lint) as the criterion for “usable”;
    • Fix generation parameters: temperature, random seed, and model version should all be written into the task metadata to keep the style consistent after recovery;
    • Shard large files, splitting on function or class boundaries to avoid a single generation request that is too long.

    Idempotency and deduplication

    The server deduplicates via Idempotency-Key (or an equivalent business identifier). On retry, the client must reuse the same key to avoid “duplicate billing, duplicate generation.”

    1. headers = {
    2. "Idempotency-Key": task_id, # Keep it unchanged across retries
    3. }

    4. On the provider side: turning recoverability into an architectural capability

    Most of the above falls on the client. But from the supply side, a truly reliable LLM service also has to answer four architectural questions: where compute comes from, how failures are isolated, how to degrade under overload, and how state is synchronized.

    Elastic compute pools and a capacity baseline

    An LLM service’s capacity is not a static value. It has three parts:

    • a reserved baseline (the minimum capacity that guarantees the SLA);
    • an elastic scaling zone (to absorb traffic peaks);
    • cross-AZ / cross-cluster redundancy (to survive single points of failure).

    The problem is that scaling GPU/NPU-class compute has an obvious lag: from requesting resources to a node being ready often takes minutes to hours, while traffic floods arrive in seconds. So you must “reserve ahead of time + queue by tier” rather than wait until capacity is maxed out before scaling.

    Establish a capacity baseline and continuously track these metrics:

    • peak concurrency;
    • average tokens per request;
    • first-token latency P95/P99;
    • output rate;
    • queue-time distribution.

    Use them to back out “the concurrency one unit of compute can support,” as a quantitative basis for scaling decisions.

    Tiered overload protection

    Under overload, the most important thing is to protect the core path. Degrade step by step in this order:

    1. Queue: put long-text requests that exceed quota into a queue rather than rejecting them outright;
    2. Rate-limit: throttle per tenant and per model;
    3. Downshift: automatically downgrade long-context requests to a smaller context or a smaller model;
    4. Circuit-break: fail fast on dependencies that keep failing, to avoid piling up threads and connections;
    5. Fallback: return a cached result or a “try again later” message to keep the endpoint available.

    Sample:

    1. # Pseudocode: tiered overload protection by priority
    2. if queue_depth > HIGH_WATER:
    3. reject_low_priority() # Fast-fail low-priority requests
    4. if gpu_util > 0.9 and avg_queue_time > SLO_Threshold:
    5. enable_small_model_fallback() # Downgrade long-context requests to a smaller model

    Fault-domain isolation

    Break shared dependencies into isolation domains: route different tenants’ / different models’ traffic through different scheduling queues, and give the core paid path its own quota and node pool, so one failure does not punch through to all users. The earlier “paid channel is affected too” phenomenon is essentially insufficient isolation.

    State synchronization and observability

    During an outage, what erodes trust most is not the interruption itself but “nobody explains what is happening.” Recommendations:

    • External status communication: an independent status page or announcement channel showing the real-time health of each service component; during a failure, clearly state “scope of impact + current progress + estimated recovery time,” and after recovery post a postmortem summary. Similar capabilities exist as general-purpose categories on cloud platforms such as Baidu AI Cloud—monitoring and alerting, log services, object storage, and message queues—and can be combined as needed.
    • Internal observability: stitch together gateway logs, scheduling logs, and inference logs by “request ID” to localize issues within minutes. Core SLIs should include success rate, first-token latency, end-to-end latency P99, stream-break rate, queue time, and token-consumption distribution.

    5. Make continuity a measurable metric

    Service continuity is not a slogan; it should be turned into a set of numbers you can sign off on:

    • SLI: success rate ≥ 99.9%; first-token latency P99 ≤ 2s (set the specific thresholds per business scenario).
    • Error budget: derive the acceptable failure frequency from the monthly allowed downtime, and automatically trigger a “change freeze” once it is used up.
    • Drills: run chaos drills regularly—randomly kill nodes, inject network latency, simulate dependency timeouts—to verify that circuit breaking and degradation work as expected.
    • Acceptance checklist (go through it item by item when selecting or building):
      1. Is there an independent status page and an incident-announcement mechanism;
      2. Is there a tiered SLA with compensation terms;
      3. Is idempotency-key and request-deduplication support available;
      4. Is there cross-AZ / cross-cluster redundancy;
      5. Is there rate-limit quota lookup and a scaling channel;
      6. Is there a change-announcement and canary-release mechanism;
      7. Are log and metric interfaces exposed for building your own monitoring;
      8. Is multi-model routing with automatic degradation supported.

    Conclusion

    Back to that outage. To an ordinary user, it was an afternoon of “can’t use it.” To a developer, it was a pile of tasks that need rewriting. To an enterprise, it was a re-evaluation of the provider’s reliability.

    Three things are worth remembering:

    • Failures are unavoidable, but their impact is controllable. Layered localization, correct retries, and checkpointed resume can compress an interruption from “lose all progress” down to “lose a few tens of seconds.”
    • Compute elasticity and isolation design set the floor. Shared scheduling saves cost but enlarges the blast radius; tiered quotas and dedicated node pools are the baseline guarantee for paying users.
    • Transparency is part of reliability. Status communication and postmortems often retain users better than spending an extra half hour on fixes.

    Write these three things into the architecture, into the process, and into the contract, and service continuity stops being a remedy applied after a failure and becomes an engineering capability that is always in effect.