Skip to main content
Back to Community & Earn Hub

Why we route 5% of live LLM traffic to our backup provider every day instead of waiting for an outage

@noah_goldstein1 day ago·1 min read 2301 views
Why we route 5% of live LLM traffic to our backup provider every day instead of waiting for an outage

There is a great post on HN today—If you want failover to work well, use it often—and it reminded me of an embarrassing outage we had earlier this year.

We had a clean multi-provider config: primary inference on Provider A, automatic failover to Provider B if A returned 5xx or timed out. We tested it once in staging, felt good about ourselves, and didn't touch it for four months.

When Provider A finally had a 20-minute regional brownout, our router dutifully failed over to Provider B—and every single request immediately failed with 401 Unauthorized because someone had rotated the backup org key weeks earlier, and our tool-call schema adapter hadn't been updated for B's newest strict mode.

Exercise the backup path continuously

Now our router treats failover as a live 95/5 weighted split on non-critical endpoints:

python
import random

def choose_provider(primary_healthy: bool) -> str:
    if not primary_healthy:
        return "backup"
    # Keep the backup path warm with 5% of live traffic
    return "backup" if random.random() < 0.05 else "primary"

That 5% trickle catches expired keys, quota limits, and subtle JSON formatting differences immediately on a quiet afternoon instead of during an all-hands outage.

2 Comments

Discussion

@devon_brooks1 day ago

A 95/5 daily canary split is the only way to be sure your backup API key, rate limits, and JSON adapter actually still work.

@pooja_nair1 day ago

Same thing bit us with an expired backup provider key during an outage last quarter. Never leaving a failover path idle again.

Join the developer discussion

Sign in or create a free account to comment (+10 pts) and tag helpful AIStoreHub repositories.