Skip to content

LLM Provider Failover: Capacity, Equivalence, and Retry Storms

9 min reading

Model routing must preserve task meaning and handle recovery load; lower request prices alone do not establish a better system.

Page details

Blog 06 · Vikram Samal

Edition date: · 9 min read

20px

Edition dates place posts in a retrospective weekly reading sequence.

Last edited:

Sources · Technology essay

Editorial correction:

Rewritten from an archived draft as a current architectural perspective. This revision uses named sources and explicitly hypothetical examples.

TL;DR
  • A reachable backup still needs enough admitted capacity and accepted behavior.
  • Keep retries, queue age and provider switching inside one task budget.
  • Shed excess demand deliberately instead of multiplying it during an outage.

The primary stops responding.
The backup answers its health check.
That does not mean it can absorb the queue.

Hypothetical scenario. Act 4, the rebuild. At 2 a.m., Northwind moves policy-assistant traffic to a backup provider. The backup endpoint is reachable but its admitted capacity is smaller than the incoming workload. Sam sees rising queue age while callers repeat requests that are already waiting.

Availability has a workload attached

Provider failover moves requests from an unavailable or unacceptable primary route to an alternative. A route includes more than a hostname: credentials, regional capacity, quotas, model behavior, request formatting and output interpretation all participate. A successful health check establishes only that one probe worked under its own small workload.

Capacity is the rate and concurrency a route can sustain within the required service objective. A published quota is an allowance, not proof that every request mix reaches that rate. Long inputs, generated outputs and tool loops can consume different amounts of time and token budget. Northwind needs an admitted workload measured in terms meaningful to both its users and the provider limits.

Behavioral equivalence means the backup meets the application’s acceptance contract. It need not produce identical prose. It does need to preserve policy facts, output structure, allowed tools, permissions and required refusal or escalation behavior. A backup that responds promptly with unsupported advice has restored transport availability without restoring the service Northwind promised.

Incoming demandAdmission budgetQualified backupReject excess
The backup serves only admitted work; excess demand receives an explicit bounded outcome.

Start with the capacity mismatch

Hypothetical worked example: 100 requests arrive each second and the backup can serve 30 requests per second under the assumed workload. The excess arrival rate is 100 − 30 = 70 requests per second. Starting with an empty queue, and temporarily ignoring abandonment, 10 seconds of that mismatch accumulate 70 × 10 = 700 queued requests.

A 10-second waiting deadline does not create capacity for those requests. Under a fluid FIFO approximation with service at 30 per second, the tail of a 700-request queue would wait roughly 700 / 30 = 23.3 seconds before service. Deadline expiry and shedding would alter the later queue size; the simple 700 figure describes accumulation before those controls are modeled, not a steady-state promise.

Sam should decide which 30 requests per second to admit and what to tell the excess callers. A bounded rejection or a noninteractive handoff is a more honest outcome than silently adding work that will expire. Queue age is the important user-facing constraint; queue length alone does not identify whether a task still has time to finish.

One task keeps one deadline through every route

The original request carries an end-to-end deadline. Each primary attempt, delay and backup attempt consumes part of that allowance. Switching provider should not reset the clock. A caller who has already waited through a primary timeout should not be given a fresh full wait merely because another endpoint is available.

AWS’s retry guidance explains that retries can amplify load and that timeouts leave uncertainty about side effects. Northwind chooses one layer to own the attempt policy, then configures subordinate clients to respect it. Otherwise an application retry, SDK retry and proxy retry can each multiply the same logical request without a shared spending decision.

AWS’s backoff-and-jitter analysis supports spreading retries over time rather than having clients synchronize. Jitter reduces coordination among retries; it does not fix a permanent 70-request-per-second capacity deficit. Admission control and load shedding are still required when demand exceeds the backup’s sustainable service rate.

Check equivalence before the outage

Run the same accepted task set against the backup before enabling automatic use. Include structured output, evidence support, tool arguments, refusal behavior and the question slices that matter most to Priya. A general benchmark or provider’s advertised compatibility does not establish that Northwind’s parser and policy assistant will accept the responses.

OpenAI’s structured-output guide describes schema-constrained outputs and separate handling for refusals. Those interface details show why switching a model route can require more than copying the prompt. Northwind’s adapter should normalize supported responses while preserving meaningful distinctions such as refusal, incomplete output and a proposed tool operation.

OpenAI’s evaluation guidance emphasizes task-specific checks and evaluation through changes. Keep a versioned backup acceptance record and rerun it when either endpoint, prompt or tool catalog changes. A backup last checked against an older application contract is another stale dependency, even if its credentials and health checks remain valid.

Prefer a circuit decision over a crowd of guesses

A circuit breaker temporarily stops ordinary attempts to a route after a defined failure signal, then permits bounded probes during recovery. Define the signal carefully: capacity throttling, transport failure and unacceptable model behavior can require different decisions. A burst of customer validation errors should not automatically cause a provider-wide traffic shift.

The breaker needs scope. One region or workload slice can fail while another remains usable. A global switch can overload the backup unnecessarily. Northwind should bind route health to the relevant capacity pool and request type, while keeping enough aggregate control to prevent many local clients from independently flooding the same alternate endpoint.

AWS’s load-shedding guidance explains rejecting work before overload destroys useful service. Reserve capacity for essential operations and reconciliation where appropriate. For Northwind, an optional long-form explanation can be deferred while a pending payment lookup receives a smaller protected budget. The priority rule must reflect the user contract rather than whichever client retries most aggressively.

In the wild: overload needs deliberate refusal

AWS’s Builders’ Library describes load shedding as a way to protect service under excess demand. Its guidance is a real operational reference, not a report that Northwind sustained a particular rate. The mechanism supports a direct design decision: determine where admission happens, which signal triggers rejection and how the caller learns when retrying is appropriate.

That matters because positive feedback can continue after an initial fault has passed. Waiting tasks occupy resources, clients retry and recovery traffic competes with new work. This essay treats that as a failure mechanism, without importing a universal duration or probability from a different system. A restoration plan must drain or reject stale work as well as reopen the primary route.

The load-shedding decision should be observable as a distinct outcome. Mixing deliberate admission rejections with provider failures hides whether Northwind is protecting its limits or unexpectedly losing admitted work. Track accepted tasks, rejected tasks, expired tasks and completed tasks against the same arrival population, so the recovery dashboard cannot improve merely by dropping inconvenient denominators.

Avoid switching an uncertain side effect

A model-generation call and a refund tool call have different repetition consequences. Switching generation providers can create another answer and another charge. Repeating a refund through a different integration can create another business effect. Keep already authorized actions attached to their original identity and provider evidence while the model route changes around them.

The fallback should also receive only evidence permitted for that task and destination. A primary route’s allowed data handling is not automatically shared by every backup. Deployment configuration must bind eligible workload classes to approved routes. An outage does not grant permission to send a confidential policy to an otherwise unapproved service.

Common misconceptions include treating two vendors as independent capacity guarantees, assuming identical token limits imply identical tokenization, and letting every timeout trigger immediate failover. Correlated network paths, shared upstream dependencies and workload differences can defeat those assumptions. Design tests around the specific contract and failure domain rather than the number of provider logos in the diagram.

Recover without starting another surge

When the primary improves, ramp traffic back gradually and observe the same acceptance measures used for the backup. Expire obsolete queued requests before dispatch. Keep the route decision and attempt history with the logical task so Priya can explain whether a delayed answer was generated twice or whether a customer action remains unresolved.

A useful exercise constrains backup admission to the documented test capacity while replaying an explicit hypothetical arrival pattern. Inspect queue age, completed accepted tasks and rejected work. Such a capacity exercise is distinct from a health check and from a quality evaluation; the failover claim needs evidence for all three concerns.

Limits: a tested backup can still lose quota, capacity or acceptable behavior during a real outage. This plan bounds the work Northwind promises to admit; it does not manufacture spare capacity. The rebuild decision is to qualify the alternate route, retain one deadline and attempt budget, and reject excess demand early enough that the accepted work can still complete.

Check yourself: llm decisions

Demand is 100 requests/s and backup service is 30/s. What happens without shedding?

The backlog initially grows by 70/s. After ten seconds without abandonment it reaches 700 requests; a waiting deadline cannot make that stable.

The backup returns valid JSON but invents a policy exception. Has failover restored the contract?

No. Format compatibility is only one condition. Evidence support and application acceptance must also hold.

The primary recovers. Should every queued and retried task be dispatched immediately?

No. Expire stale work, preserve original deadlines and ramp admitted traffic. Immediate replay can recreate overload.

Next read: Upgrading an LLM Without Breaking Production: A Behavioral Release Checklist.

Source: Timeouts, retries, and backoff with jitter — Inspect Primary Source ↗
VS
Vikram Samal

Notes on generative AI and system design.