Skip to main content
Back to all articles
AI Engineering 18 min readUpdated December 2, 2026

A Failover Route Is Not a Recovery Path: Proving Independence in AI Infrastructure

Two LLM providers can share the same failure domain. Build an evidence-backed recovery graph that checks cloud, networking, identity, control-plane and capacity dependencies before admitting fallback routes, then test correlated outages without weakening safety.

By Salman Butt · Senior Full-Stack & Generative AI Engineer
#llm-reliability#multi-provider#failover#failure-domains#disaster-recovery#typescript#python#sre#agent-security
On this page

Two model providers are not automatically two independent ways to complete a user request. A gateway can have correct circuit breakers, clean timeout handling, and a working fallback branch while the entire workflow remains exposed to one regional outage, one identity service, or one configuration API.

This is a different question from whether the failover *code* works. It asks whether the full recovery path can operate when the dependency that caused the incident is unavailable.

I would make independence an explicit release property: every critical fallback must have documented failure domains, known unknowns, compatible capacity, and a tested recovery procedure that does not require the failed path to come back first.

This is an original engineering proposal for a hypothetical multi-tenant AI support platform. Its primary inference route uses one managed LLM service, and its alternate route uses a separately operated inference deployment. The examples are architectural sketches and test harnesses, not claims of measured outages or guarantees of independent infrastructure.

I have previously covered provider failover and graceful degradation, latency brownout detection, and agent backpressure. Those articles explain *when* a route should stop receiving work and *how* to protect the application under degradation. Here the question is narrower and more fundamental: if the primary path disappears, what else must still be alive for fallback to work?

Name the outcome before designing the backup

The success criterion is not that a gateway sends a request to a different hostname. It is that an authorized workflow reaches an acceptable result within its deadline and policy boundaries.

Take a support agent that can look up subscription status and draft a billing response. It may depend on:

LayerPrimary pathPotential shared dependency
Model inferenceManaged inference vendor ASame underlying cloud or regional backbone
Model fallbackManaged inference vendor BSame network, edge, or upstream serving service
RoutingInternal AI gatewayOne gateway cluster for both vendors
AuthenticationWorkload identityCentral issuer or token-exchange service
SecretsRuntime credential retrievalOne vault, one unreplicated key service
ConfigRoute policy lookupOne global config/control-plane endpoint
Safety checksTool and data access policyOne central authorization database
Tool executionCRM or billing APISame downstream business service
ObservabilityHealth probes and tracesMonitoring pipeline may be unreachable

Any hard dependency that fails alongside the primary can make the alternate route irrelevant. This includes shared dependencies *owned by the application*, not only shared infrastructure among model vendors.

The Google Cloud SRE guidance on services with dependencies makes an important distinction between hard, soft and degraded dependencies. Model routing is only one part of the user's dependency graph.

The AWS multi-Region fundamentals similarly emphasize isolating application dependencies across regions and examining SaaS, identity, networking, and configuration paths. The lesson applies even if a product only uses externally hosted AI models: the backup needs every dependency required to serve the request, not just an alternate model.

Model routes as dependency graphs, not vendor strings

I would represent each executable route as a directed graph with typed nodes:

  • Endpoint nodes: the inference serving system, DNS, edge, and network reachability.
  • Runtime nodes: gateway, application workers, tool executors, and their regional placement.
  • Authority nodes: identity verification, secrets, authorization, and account entitlements.
  • State nodes: durable workflow checkpoints, policy snapshots, and business records.
  • Recovery nodes: configuration changes, operator actions, DNS updates, and capacity provisioning that must occur before service resumes.

A route is viable if it has a complete, authorized chain of dependencies needed to deliver the specific workflow. A route that relies on a broken identity provider for every new token is not viable simply because its inference endpoint responds to an unauthenticated health probe.

~~~text Authenticated workflow | Capability policy | Protected AI gateway | +----------+----------+ | | Route A Route B | | Provider API A Provider API B | | Serving cluster Serving cluster | | Network A Network B | | +----- Shared? -------+ | Hidden dependency inventory: DNS / edge / identity secrets / quotas / gateway control plane / business DB | Independence proof / \ Reviewed route Unproven route | | Eligible fallback Hold / investigate

The graph describes what is required for a user outcome, not merely what endpoints are configured. ~~~

There is no guarantee that a commercial provider will disclose its entire infrastructure graph. Treat opaque infrastructure as an unknown, not as evidence of independence. This is a risk-assessment exercise with a confidence level, not a universal mathematical proof.

A failure domain is more precise than a provider label

A provider label is a commercial name. A failure domain is an underlying component or correlated set of components whose impairment affects all routes that depend on it.

Useful categories include:

  • Physical site, region, or availability-zone placement.
  • Inference-serving owner and underlying compute fleet, when known.
  • Cloud account, control plane, or identity issuer required for access.
  • DNS, edge, transit, and network connectivity.
  • Gateway and policy infrastructure operated by the application.
  • Data and tool dependencies needed for the workflow.
  • Rate-limit and capacity pools, including a common upstream reseller.

The categories are not uniformly independent. Two regions in different clouds can still depend on the same customer-managed DNS zone or centralized gateway. Two endpoint URLs might map to the same backend capacity. Conversely, two services sharing a cloud vendor do not necessarily share every failure mode.

The right comparison is *which actual failure can take out both*, not whether one field in a spreadsheet happens to match.

The AWS documentation on static stability calls out the danger of making recovery depend on a control plane that may itself be impaired. The operational consequence is to pre-provision enough of the recovery path to work from previously approved state, instead of relying on creating resources during the incident.

Classify independence evidence without pretending certainty

I would keep an approval record for each critical inference route. It could look like this:

~~~json { "routeId": "support-fallback-west", "workload": "billing-support-readonly", "owner": "ai-platform", "domains": [ {"kind": "cloud-region", "id": "region-b", "verified": true}, {"kind": "serving-fleet", "id": "fleet-b", "verified": true}, {"kind": "edge", "id": "unknown", "verified": false} ], "recoveryMode": "preprovisioned", "readinessEvidence": "test-report-reference", "revision": 7 } ~~~

The identifiers are hypothetical and must not be mistaken for real provider locations or capacity commitments.

A critical review should distinguish three decisions:

  1. Known shared failure domain: there is evidence both routes depend on the same component that the proposed failure scenario removes.
  2. Unknown or unverified dependency: a material part of one route has not been independently established.
  3. Known-distinct for the declared threat model: evidence supports different infrastructure in the domains the policy requires.

The third conclusion does not mean the routes can never fail together. Natural disasters, wide-area networking failures, routing errors, shared software vulnerabilities, and operational mistakes can cross apparently separate domains.

I would document the *assumed fault scenarios* alongside the approval. A fallback can qualify for a regional outage without qualifying for global identity-provider failure.

TypeScript: compare domains using a declared threat model

The following pure function compares preverified application-owned route profiles against a selected list of relevant fault domains. It intentionally does not discover physical infrastructure or decide whether a vendor's claim is truthful.

~~~typescript type DomainKind = | "region" | "serving_fleet" | "edge" | "identity" | "gateway" | "secrets";

type DomainEvidence = Readonly<{ kind: DomainKind; identity: string; verified: boolean; }>;

type RouteProfile = Readonly<{ routeId: string; revision: number; domains: readonly DomainEvidence[]; preprovisioned: boolean; }>;

type Review = | { kind: "reject"; reason: string; domain?: DomainKind } | { kind: "hold"; reason: string; domain?: DomainKind } | { kind: "candidate"; evaluated: readonly DomainKind[] };

function indexDomains( route: RouteProfile, ): Map<DomainKind, DomainEvidence> { const result = new Map<DomainKind, DomainEvidence>(); for (const domain of route.domains) { if (result.has(domain.kind)) { throw new Error("Duplicate domain kind"); } result.set(domain.kind, domain); } return result; }

export function assessFallback( primary: RouteProfile, fallback: RouteProfile, required: readonly DomainKind[], ): Review { if (!primary.routeId || !fallback.routeId || primary.routeId === fallback.routeId) { return { kind: "reject", reason: "invalid_route_pair" }; }

if (!Number.isSafeInteger(primary.revision) || !Number.isSafeInteger(fallback.revision) || primary.revision < 1 || fallback.revision < 1 || required.length === 0 || new Set(required).size !== required.length) { return { kind: "reject", reason: "invalid_review_policy" }; }

if (!fallback.preprovisioned) { return { kind: "hold", reason: "recovery_not_preprovisioned" }; }

const a = indexDomains(primary); const b = indexDomains(fallback);

for (const kind of required) { const left = a.get(kind); const right = b.get(kind);

if (!left || !right || !left.verified || !right.verified || !left.identity || !right.identity) { return { kind: "hold", reason: "missing_evidence", domain: kind }; }

if (left.identity === right.identity) { return { kind: "reject", reason: "shared_domain", domain: kind }; } }

return { kind: "candidate", evaluated: required }; } ~~~

This is deliberately stricter than many operational systems: if the required domains are not verified, the result is hold. That does not mean a business must immediately disable all existing fallback functionality when some vendor information is unavailable. It means the organization cannot claim this route meets the specified independence assurance until it documents accepted residual risks or finds alternative evidence.

The review must also bind the evidence to the exact endpoint deployment, account, region, and policy revision. A route identifier entered by the model is not trusted evidence. In a production system, authenticated inventory collectors and controlled configuration own those fields.

The returned candidate result is *not* a license to dispatch arbitrary data. Compatibility, tenant authorization, cost, and model quality are independent gates.

Check the recovery mechanism as a separate route

There are at least two paths to model:

Normal data path: what the application requires to execute an already-approved inference call.

Recovery path: what the operators and automation require to detect an incident, select a different route, enable capacity, load credentials, and update routing state.

A system may have two working data paths but one fragile recovery path. For example, the fallback service exists and is healthy, but its credentials are retrieved dynamically from a vault in the failed region. Or changing routing requires a global configuration API that is unavailable during the incident.

The correct recovery strategy is to reduce *new* dependencies during failure:

  • Pre-provision fallback capacity and validated credentials within allowed security policy.
  • Replicate or localize essential configuration before a region is impaired.
  • Use short-lived, securely refreshed credentials where possible; test the behavior when token refresh is temporarily unavailable.
  • Give the gateway an authenticated, expiring last-known-good policy snapshot.
  • Avoid requiring a failed primary-region control plane to perform the cutover.
  • Keep manual break-glass procedures explicit and authorization-protected.

An expiring policy snapshot needs strict bounds. If the policy now denies an action, an old cached allow decision should not silently become permanent. Separate *routing configuration freshness* from *user permission freshness*; a route may be statically available while sensitive tool writes are suspended.

This is the practical meaning of recovery independence: a pre-existing approved data path should be able to keep operating under declared failure conditions without reconstructing itself through the impaired service.

A fallback that exists but has no capacity is not ready

Infrastructure independence is necessary, but not sufficient. The backup might be served by separate hardware and still lack enough allocated throughput for surge traffic.

For an AI platform, the standby needs a workload-specific capacity plan:

RequirementWhy it matters during failover
Reserved or demonstrated serving capacityThe alternate route may see a sudden traffic spike
Separate quotas and token limitsA fallback can fail with rate limiting even when healthy
Model contract compatibilityTool calls, schemas and allowed output need qualification
Data residency and permissionsCross-cloud routing may be prohibited for some tenants
Prompt/context limitsA smaller replacement may reject previously valid requests
Cost ceilings and overload protectionAn emergency should not become unlimited spend
Recovery from in-flight workTool writes and partially streamed answers need reconciliation

In my model-routing article, route approval is conditioned on task capability, not merely cost and speed. The same principle applies during emergencies: a second provider may be reachable but still be *ineligible* for a particular workflow.

For consequential actions, never allow outage code to bypass authorization. A healthy fallback with different tool semantics can make the system less safe even as availability metrics improve.

Measure co-failure with paired observations

A dependency inventory tells you what engineers believe about the architecture. Telemetry tells you how routes behaved under observed conditions. You need both.

A useful quantity is:

P(fallback unhealthy | primary unhealthy)

That is, among intervals where the primary was impaired, how frequently was the fallback also impaired?

This statistic differs from the unconditional failure rate of the fallback. A route that is healthy 99.9% of the time can still be a poor backup if nearly all of its rare failures overlap the primary.

But the measurement can be misleading if there are no fallback observations when the primary is healthy, or if health probes happen only after the primary fails. It can also be distorted by shared client-gateway outages: if the gateway is down, its own probes may disappear instead of recording two provider failures.

I would run bounded, authorized synthetic probes for eligible routes from independent observation locations, alongside real production outcomes. The probes should be comparable in model request class and should not execute side-effecting tools.

Python: calculate co-failure without inventing missing evidence

The following function uses already-normalized interval samples. Each interval includes an observation for both routes from a trusted monitoring system. It does not assume a missing result means healthy.

~~~python from dataclasses import dataclass from typing import Literal

Health = Literal["healthy", "unhealthy", "unknown"]

@dataclass(frozen=True) class PairSample: interval: str primary: Health fallback: Health

def cofailure_report(samples: list[PairSample]) -> dict: if not samples: raise ValueError("paired route observations required")

ids: set[str] = set() primary_down = 0 both_down = 0 primary_down_unknown_fallback = 0 complete_pairs = 0

for sample in samples: if sample.interval in ids: raise ValueError("duplicate observation interval") ids.add(sample.interval)

if ( sample.primary != "unknown" and sample.fallback != "unknown" ): complete_pairs += 1

if sample.primary != "unhealthy": continue

primary_down += 1 if sample.fallback == "unhealthy": both_down += 1 elif sample.fallback == "unknown": primary_down_unknown_fallback += 1

observed_primary_down = ( primary_down - primary_down_unknown_fallback ) conditional = ( both_down / observed_primary_down if observed_primary_down > 0 else None )

return { "intervals": len(samples), "complete_pairs": complete_pairs, "primary_unhealthy_intervals": primary_down, "fallback_unknown_when_primary_down": primary_down_unknown_fallback, "jointly_unhealthy_intervals": both_down, "cofailure_given_primary_down": conditional, }

The following are invented fixture values,

not measurements from any named service.

fixture = [ PairSample("t1", "healthy", "healthy"), PairSample("t2", "unhealthy", "unhealthy"), PairSample("t3", "unhealthy", "healthy"), PairSample("t4", "unhealthy", "unknown"), ] assert cofailure_report(fixture)["cofailure_given_primary_down"] == 0.5 ~~~

The conditional ratio uses only intervals where both outcomes are known and the primary is unhealthy. It separately reports missing fallback observations. This matters because an outage that also disables telemetry must not appear as a lower co-failure rate.

Do not confuse this measured association with proof of common causation. Two providers can fail in the same minute for unrelated reasons; they can also share a risky control-plane dependency without ever failing together during a short observation window.

For a low-traffic system, there may be too few primary failures to estimate the conditional probability meaningfully. Report the sample size and uncertainty; do not advertise a zero co-failure risk because no overlapping outages have been observed.

Prove isolation through controlled failure scenarios

The most useful test is a *correlated-outage drill* designed around a real dependency, not a random provider timeout.

I would test several scenarios:

Fault injectedExpected recovery behaviorWhat the drill reveals
Primary provider API unavailableApproved alternate route can serve eligible readsBasic model failover
Shared DNS resolver impairedRecovery uses a viable independent resolution pathHidden network dependency
Primary-region config API unavailableExisting fallback policy remains usableControl-plane coupling
Identity-token issuer unavailableExplicit bounded credential behavior and denied sensitive writesAuth as a recovery dependency
Alternate route loses serving quotaBackpressure and honest degraded modeCapacity assumption failure
Shared gateway cluster unavailableRegional or otherwise isolated gateway path existsLocal single point of failure
Tool backend unavailableModel route health does not hide missing business outcomeEnd-to-end dependency view
Telemetry collector unavailableController reports unknown health and uses bounded policyObserver failure handling
Active stream interruptedNo unsafe mid-stream replacementCorrect continuation semantics

The last case matters for agentic systems. Once an agent has started interacting with tools, failover is more than reissuing a prompt to another model. A timed-out write can have an unknown outcome, and a partially streamed result may not be safe to restart without an explicit continuation policy. See side-effect-safe agent execution.

A controlled drill needs safeguards. Run fault injection in a limited environment or approved traffic slice, use synthetic accounts, preserve the ability to stop the test, and ensure the experiment cannot trigger real financial or administrative actions.

For cloud-level recovery, the AWS multi-region operational readiness guidance stresses testing the combined operational and dependency assumptions of the standby. The Google SRE book also explains why load shifting and retries can amplify disturbances in dependent systems.

The application should fail honestly when every path is impaired

A design review often assumes the goal is to keep generating answers at any cost. I would instead describe a small, explicit degradation hierarchy.

  1. Continue on the primary when it meets the user's timing, security and quality contract.
  2. Move eligible work to a prequalified alternate route when the primary is impaired.
  3. Restrict optional features and admit only work that fits the remaining capacity and deadline.
  4. Queue or defer asynchronous work with durable state and an explicit retry policy.
  5. Return an honest unavailable result or require human handling when no authorized route is viable.

This avoids an especially dangerous anti-pattern: switching to a model that is available but not approved for customer data, a restricted geography, or state-changing operations.

No route should gain more permissions because another route went down.

It is also important not to turn queued recovery into a thundering herd. When a shared dependency recovers, returning all deferred work at once can overwhelm the alternate or recovered path. Use bounded admission, freshness checks and controlled replay of legitimate work.

Make independence a versioned release claim

I would tie the fallback approval to a specific configuration generation:

~~~text Primary route revision: model-route-a@17 Candidate fallback revision: model-route-b@9 Threat model: regional-network-impairment Reviewed dependencies: route graph snapshot 38 Evidence status: known-distinct / unknown / shared Capacity qualification: report 182 Model quality qualification: report 183 Data and security policy: approved revision 12 Correlated fault drill: run 44 Decision: admit only scoped workflows ~~~

These identifiers are illustrative. The important part is *which evidence the decision names*, not how attractive the dashboard looks.

When a provider moves its serving infrastructure, an account is reconfigured, or the identity architecture changes, the dependency evidence must be refreshed. The old approval cannot silently expand to a different topology.

A provider may not share enough implementation detail to prove all of these properties. That is a real commercial limitation. An organization can document residual risk, reduce dependence on unknown layers, or choose a more controllable deployment for its most critical workloads.

Monitor the recovery system, not just each provider

For operations, I would measure:

  • fraction of critical routes with documented, current dependency evidence;
  • fallback candidates rejected for known shared domains;
  • fallback candidates held because important domains are unknown;
  • conditional co-failure rate with paired observation coverage;
  • alternative-route capacity during realistic traffic transfer;
  • recovery time and user-visible success by workflow class;
  • route-state changes that occur while the control plane is impaired;
  • data-residency and authorization denials during failover;
  • observer-health gaps that prevent confident routing decisions;
  • success rate of recurring correlated-fault drills.

Keep provider routes, full endpoints, tenant-specific policy and credentials in access-controlled logs. Export bounded domain categories and outcome classes to shared metrics.

A dashboard showing that a circuit breaker opened and traffic moved to a fallback is evidence of *router behavior*, not proof of customer recovery. The ultimate signal is a completed, policy-compliant user workflow.

Choose the degree of resilience the product actually needs

Not every AI feature needs a second cloud, a preprovisioned inference fleet, and a recurring infrastructure fault-injection program. The added complexity can introduce its own risk.

For a low-stakes, asynchronous summarizer, a durable queue and delayed retry may be an appropriate response to a broad outage. For an interactive product with contractual uptime targets, the investment in independently served capacity may be justified. For safety-critical operations, preventing unauthorized or incorrect actions can be more important than keeping a model online.

The decision should start from a user-facing SLO and a failure budget, then work backward through the dependencies required to deliver that outcome. The Google Cloud guidance on dependency-aware SLOs makes precisely that distinction: dependency SLAs do not automatically compose into the reliability experienced by users.

The core operational rule I would keep is this: a backup provider is a candidate; a tested, independent, authorized and adequately provisioned end-to-end route is a recovery path.

When engineers make that distinction explicit, they stop mistaking vendor diversity for failure isolation—and start validating the recovery outcome the product actually needs.

Primary technical sources

KEEP READING

Related engineering notes