- Active-active vs active-passive is a choice about the backup: active-active sends it live traffic all day by weight, and active-passive holds it until the primary has failed a request.
- For LLM APIs, active-active means weighted load balancing across keys or providers serving the same model. Active-passive means a fallback chain, often to a different model family.
- Extra API keys raise capacity only when they sit in separate rate-limit scopes. OpenAI limits apply per organization and project, and Azure OpenAI quota per subscription, region, and model.
- A passive standby waits for the primary's retries first. With Bifrost's default backoff, 3 retries on the primary add about 3.5 seconds of backoff before the fallback's first attempt.
- Most production stacks should layer both: weighted keys inside each provider, weighted providers for the same model, and a passive fallback to another model family last.
Active-active vs active-passive failover comes down to one question: does the backup carry live traffic before anything breaks? For LLM APIs, active-active means splitting requests by weight across API keys or providers that all serve production traffic. Active-passive means a fallback chain that sends a request to the standby only after the primary has failed it. The two models trade rate-limit headroom and tested failover paths against output consistency and cost. This article compares them on those dimensions and uses Bifrost, an open-source AI gateway, as the worked example for weighted keys, provider weights, fallbacks, and adaptive load balancing.
#Active-active vs active-passive: the two models defined
Active-active failover sends live traffic to every target at once, in proportions you set, so losing one target moves only its share to the others. Active-passive failover sends all traffic to one primary and keeps the other targets in reserve until the primary fails. Both terms come from databases and load balancers, and both apply to an AI gateway routing LLM calls.
In an LLM stack, the targets are API keys, provider accounts, or whole providers. Splitting one model's traffic 80/20 between Azure OpenAI and OpenAI is active-active: both are answering requests right now. Sending everything to OpenAI and listing an Anthropic model as the fallback is active-passive.
LLM providers change one part of the classic picture. In a database cluster, the passive node is your own hardware, and keeping it warm costs money. With an LLM API, the standby is a multi-tenant service that someone else keeps running. It is always warm. What stays cold is your path to it: the key, the model access, the prompt that was never tested against it, and the quota you never measured.
#How active-active works for LLM traffic
Active-active for LLM traffic is weighted random selection. Each request picks a key or provider with probability proportional to its weight, so a target with weight 0.7 gets about 70 percent of requests over time. Weighting can happen at two levels, across keys of one provider and across providers serving the same model, and the two levels solve different problems.
Bifrost implements the first level through weighted key selection. It sums the weights of the keys eligible for the request, draws a random number in that range, and picks the key whose slice contains it. A key is eligible only if its models list allows the requested model: ["*"] allows every model, and an empty array denies all of them.
Weight 0 has two useful behaviors. A key with weight 0 is skipped while any other eligible key has a positive weight, but it still serves when it is the only one left, for example on a retry after the others failed. That makes weight 0 a soft drain before removing a key. If every eligible key has weight 0, selection is uniform.
The second level, splitting one model across providers, adds a second vendor's capacity and outage pattern to your normal traffic. That is the point of it. When one provider returns 5xx errors for an hour, it only owned part of your traffic during that hour.
#How active-passive works for LLM traffic
Active-passive for LLM traffic is an ordered fallback list that the gateway walks only after the primary fails. The primary gets its full retry budget first, then each fallback is tried in order with a retry budget of its own, and the first success is returned. The standby often runs a different model than the primary, which is where most of the trade-offs below come from.
In Bifrost, fallbacks are a fallbacks array of provider/model strings in the request body. A primary and two fallbacks, each with max_retries: 3, can make up to 12 attempts in total. If every attempt fails, the gateway returns the primary's error and the primary's response headers, not the last fallback's, so error handling in your app keeps seeing the provider you called first.
A fallback does not run when the caller cancels the request, or when a plugin sets AllowFallbacks = false on the error. That flag is for errors that no other provider will fix, so the chain stops instead of sending a doomed request three more times. For how retries, fallbacks, and 5xx errors from upstream look in practice, the companion piece on 502 Bad Gateway errors from LLM APIs covers the error side.
#Rate limits and quota: where active-active pays off
Active-active wins on rate limits, but only when the targets have separate limits. Provider rate limits attach to an account scope, not to an API key, so two keys in the same scope share one bucket. Spreading traffic across separate scopes adds capacity; spreading it across keys inside one scope only spreads credentials.
The scopes differ by provider, as of November 23, 2026:
| Provider | Where the limit lives | What adds capacity |
|---|---|---|
| OpenAI | Organization and project, not per user or key | A separate organization, or a higher usage tier |
| Azure OpenAI | Quota per subscription, region, and model, split across deployments as TPM | Another region or subscription; extra deployments in one region share its quota |
| Any provider, across providers | Each vendor's own account | Adding the second provider itself |
This is where key weighting earns its place. Bifrost's retry rules send a 429 retry to a different key, with backoff, so a pool of keys that map to different Azure regions or deployments rides out throttling on one of them. Network errors and 5xx responses retry on the same key. Rejected credentials, exhausted quota, and retired models mark the key dead for that request and move to the next key with no backoff, and those attempts do not count against max_retries.
Active-passive handles throttling late. A standby account with its own quota does nothing while the primary returns 429s, and the standby only helps after the primary has spent its retries on the throttled key. If your recurring problem is throttling rather than outages, a fallback chain answers it seconds after it could have.
#Latency: the cost of waiting for the primary to fail
A passive standby adds latency at the worst moment, because a request that fails over pays for every attempt on the primary first. Active-active has no failover delay for the share already routed to a healthy target, but its normal response times mix two providers' latency profiles. One model moves latency into incidents; the other spreads it across every day.
Bifrost's backoff starts at retry_backoff_initial (500 ms by default), doubles on each retry, stops growing at retry_backoff_max (5,000 ms), and adds 20 percent jitter either way. Retries are off by default, with max_retries: 0. Figure 2 sums those delays: 3 retries mean about 3.5 seconds of backoff before the first fallback attempt, and 5 retries mean 12.5 seconds. Add the time each failed attempt takes, which for a timeout can far exceed the backoff, and the true wait is longer.
Two settings follow from that arithmetic. Keep max_retries low on a primary that has a passive fallback, since every extra retry delays the standby. And keep request timeouts close to what your users will tolerate, so a hung primary releases the request before the user gives up.
#Cost and output consistency
Active-passive costs less when the primary is the cheapest model you trust, because steady traffic pays that price and the standby's price applies only during incidents. It is also more consistent: every normal request hits one model on one provider, so prompt tuning, evals, and semantic caching all describe one system. Active-active across providers gives up some of both.
| Dimension | Active-active | Active-passive |
|---|---|---|
| Price per token | Blended by weight; a pricier provider raises the average | The primary's price, except during incidents |
| Output consistency | Two providers answer users every day | One system answers, until an incident |
| Rate-limit headroom | Adds up across separate scopes | Standby quota sits unused |
| Failover delay | None for the healthy share | Primary's retries and backoff first |
| Confidence in the failover path | Proven by live traffic all day | Unknown until tested or until an incident |
The same model name on two providers is not always the same system. Versions, default settings, content filters, and supported parameters can differ. Keep provider-level weights on providers that serve the identical model version, and if your output is parsed by code, keep a different model family out of the weighted split entirely. Format drift in a 20 percent share becomes a steady-state bug instead of an incident-only one.
#Confidence in the failover path
Active-active tests its own failover every minute, because every target serves real requests. A revoked key or a misconfigured deployment shows up on a normal weekday, from a small share of traffic, with full logs. Active-passive hides broken standbys: a fallback with an expired key, a model the account cannot access, or a prompt that the fallback model handles badly fails only when it is needed.
That is the strongest argument for layering. Weighted targets prove themselves continuously, and the passive tail stays small enough to test on a schedule. The failover testing guide covers how to inject faults into a gateway and check that the standby actually answers, which is the only way to trust a passive chain.
#How Bifrost combines both models
Bifrost runs both failover models from one configuration: weighted keys and provider weights on virtual keys for active-active, and fallback chains for active-passive. The provider weights also generate a passive chain automatically when a request does not bring its own, so one config can produce both behaviors for the same model.
#Weighted keys inside one provider
Each provider in the gateway config holds a list of keys, each with a weight and a models list. This example pools two OpenAI keys, which helps when they belong to separate organizations, and sets a small retry budget:
{
"providers": {
"openai": {
"keys": [
{ "name": "openai-org-a", "value": "env.OPENAI_KEY_A", "models": ["*"], "weight": 0.7 },
{ "name": "openai-org-b", "value": "env.OPENAI_KEY_B", "models": ["*"], "weight": 0.3 }
],
"network_config": { "max_retries": 2, "retry_backoff_initial": 500, "retry_backoff_max": 5000 }
}
}
}#Provider weights on a virtual key
Provider-level weights live in provider_configs on a virtual key. Bifrost normalizes the weights across the providers that allow the requested model, so a model only one provider allows gets all of that model's traffic, whatever the raw weight says:
{
"provider_configs": [
{ "provider": "azure", "allowed_models": ["gpt-5.4-mini"], "key_ids": ["*"], "weight": 0.8 },
{ "provider": "openai", "allowed_models": ["gpt-5.4-mini", "gpt-5.4"], "key_ids": ["*"], "weight": 0.2 }
]
}Here gpt-5.4-mini splits 80/20 between Azure and OpenAI, and gpt-5.4 goes only to OpenAI. The model names are placeholders: use models that both of your accounts actually serve.
Weighted provider selection applies only to a bare model name such as "gpt-5.4-mini". A request for "openai/gpt-5.4-mini" names the provider and bypasses the weights, so application code that hardcodes provider prefixes quietly turns provider weights off. A provider with no weight stays out of weighted selection and out of the automatic chain, but still serves direct requests and explicit fallbacks.
#Fallback chains, automatic and explicit
When a request has no fallbacks array, Bifrost builds one from the virtual key's weighted providers, highest weight first. If the weighted pick lands on Azure and Azure fails, the request moves to OpenAI. An explicit array replaces the automatic one entirely:
{
"model": "gpt-5.4-mini",
"messages": [{ "role": "user", "content": "Summarize this ticket." }],
"fallbacks": ["openai/gpt-5.4-mini", "anthropic/claude-sonnet-5-5"]
}This is the layered setup in one request: a bare model so the weights pick the primary provider, the same model on the other provider as the first fallback, and a different model family last. If the weighted pick already landed on OpenAI, the first fallback repeats it, so keep the chain short.
A few behaviors matter for planning. Routing runs once, before the primary attempt, and does not run again for fallbacks. Governance checks, semantic cache lookups, and logging run again on each fallback attempt, so budgets and rate limits apply to the standby too. A fallback drops any key pin from the first attempt, such as an x-bf-api-key-id header, and uses the fallback provider's own keys.
#Adaptive load balancing
Static weights treat a slow provider like a fast one until someone edits the config. Adaptive load balancing, in Bifrost Enterprise, picks providers and keys from live health, latency, and load measured on real traffic, recalculated every few seconds, with no synthetic health checks. A key the provider refuses, for a rate limit or exhausted quota, is held out of rotation on every node and rechecked later with one real request.
Two details change how you operate it. With adaptive key selection on, which is the default, configured key weights are ignored, so you remove a key by disabling it rather than setting its weight to 0. And redirecting traffic away from a whole provider applies only when that provider fails on every key it could use, a behavior that is off by default.
#Which failover model to choose
Choose active-active for capacity and active-passive for survival. Weighted targets handle throttling and partial outages without delay, and a passive tail handles the rarer outage that hits a model on every provider at once. The rules below cover most LLM stacks.
- Weight keys inside a provider whenever they map to separate rate-limit scopes, such as different organizations or Azure regions. Keys in one scope add nothing but a spare credential.
- Weight providers only when both serve the same model version, and accept that response times will mix two latency profiles.
- Put a different model family in the passive tail, not in the weighted split, especially when code parses the output.
- Keep the primary's
max_retrieslow when a passive fallback follows it, since each retry delays the standby. - Send bare model names from your app, or provider weights and automatic fallbacks never run.
- Watch
extra_fields.routing_infoin gateway responses: itsis_fallbackflag andprimary_providerfield show how often requests leave the primary. On a healthy passive chain, the fallback rate should sit near zero, and a rising rate is the early sign of a failing primary.
Failover decides where a request goes; governance decides whether it should go at all. Bifrost applies virtual keys, budgets, guardrails, and audit logs at the gateway, and Bifrost Edge extends the same governance and security to AI traffic on employee machines, with guardrail enforcement on each device. For a wider comparison of gateways on failover, budgets, and licensing, see the best LLM gateways ranking, where Bifrost places first.
#Questions
What is the difference between active-active and active-passive failover?
In active-active failover, every target serves live traffic at the same time, in proportions you set, so a failure only moves the failed target's share to the others. In active-passive failover, one primary serves everything and a standby receives requests only after the primary fails. For LLM APIs, active-active is weighted load balancing across keys or providers, and active-passive is a fallback chain.
Is active-active better than active-passive?
Neither is better everywhere. Active-active wins on rate limits and on confidence, because every target proves itself on real traffic all day. Active-passive wins on output consistency and on cost when the primary is your cheapest model. Most LLM stacks run both: weighted keys and providers for the same model, then a passive fallback to a different model family for outages that hit every target at once.
What are the disadvantages of active-active for LLM APIs?
Splitting traffic across providers means two systems answer your users, so response times mix two latency profiles, and the same model name can behave differently on each provider. Your blended price follows your weights, so a pricier provider raises the average. Extra keys also add no capacity when they share one rate-limit scope, such as two OpenAI keys in the same organization.
Does adding more API keys increase my rate limit?
Only when the keys sit in separate rate-limit scopes. OpenAI defines limits at the organization and project level, not per key, so two keys in one project share one bucket. Azure OpenAI assigns quota per subscription, region, and model, and each deployment draws from it. Spreading traffic across separate organizations, subscriptions, or regions adds capacity; extra keys inside one scope only spread credentials.
What triggers a fallback in an LLM gateway?
In Bifrost, a fallback starts after the primary provider fails and its retries are spent, whatever the error, with a few exceptions. It does not start when the caller cancels the request, or when a plugin marks the error as not worth retrying elsewhere. Each fallback gets its own retry budget, and if every target fails, the gateway returns the primary's error rather than the last fallback's.
Should a fallback use the same model or a different model?
Put the same model on another provider first, because users and parsers see no change in output. Put a different model family last, for outages that take the model down everywhere. A different family changes the tokenizer, price per token, and response style, which is acceptable for an incident but a poor fit for steady traffic, especially when code parses the output.