HTTP 429 · Retry-After Cap 300s · Auth-Rot Separation

HTTP 429 Rate Limit & Retry-After Automatic Upstream Failover

Treating every non-200 HTTP status identically causes two opposite failures: hammering rate-limited providers during Retry-After windows, or failing over endlessly on malformed 400 client inputs. FuelRouter maps every status code to an exact deterministic policy.

HTTP Status Classification & Failover Action Matrix

Status ClassHTTP CodesFailover?Circuit ImpactCooldown Policy
Retryable Rate Limit429 Too Many RequestsImmediate failoverIncrement failure / cooldownRespect Retry-After header (capped at 300s)
Retryable Server/Timeout408, 500, 502, 503, 504Immediate failoverIncrement consecutive_failuresTrips OPEN at 3 consecutive failures (45s-900s)
Upstream Auth Rot401, 403Immediate failoverIncrement failure & flag vaultPrevents expired session from blocking healthy peers
Non-Retryable Client400, 422No failoverZero circuit penaltyReturns HTTP 422 ($0 charged) to caller immediately

Respecting Retry-After Without Enabling DoS Locks

When an upstream returns HTTP 429 with Retry-After: 90, FuelRouter honors that window by setting circuit_open_until_ts at least 90 seconds forward, preventing wasted probes while immediately serving the caller through another pool member.

To defend against misconfigured upstreams sending absurd values like Retry-After: 864000, FuelRouter enforces retry_after_cap_s: 300 (5 minutes) combined with global max_cooldown_s: 900.

Isolating 401/403 Session Expiration Across Vault Accounts

Cookie-backed and token-backed free tiers occasionally experience session expiration (HTTP 401 or 403). FuelRouter classifies 401 and 403 as auth_rot_http_statuses, failing over instantaneously to healthy vault accounts while recording the redacted failure event for operator inspection.

Conversely, HTTP 400 and 422 indicate an invalid caller payload—stopping failover immediately so bad requests do not waste quota across all 8 upstreams.

Inspect Cooldown & Retry-After Enforcement in Dispatch Trace

{
  "ok": true,
  "served_by": "search_valyu_free",
  "charged_micros": 8000,
  "trace": [
    {"step": 1, "upstream_id": "search_tavily_free", "outcome": "http_429", "status_code": 429, "circuit_state": "OPEN"},
    {"step": 2, "upstream_id": "search_valyu_free", "outcome": "hit", "status_code": 200, "circuit_state": "CLOSED"}
  ]
}

HTTP 429 & Status Handling Checklist

Frequently Asked Technical Questions

Does FuelRouter sleep during a 429 Retry-After window before failing over?

No. FuelRouter places the 429 upstream into cooldown and fails over immediately to the next healthy candidate within the same request.

Why cap Retry-After at 300 seconds?

Capping at 300s respects polite vendor rate limits while preventing a buggy header from taking an upstream offline for days.

What happens if an upstream returns 403 due to an expired vault cookie?

FuelRouter treats 403 as auth rot, fails over immediately to another vault slot, and logs a redacted trace without exposing any cookie.

Live Try-Now Console & Machine Discovery

Test failover routing, dry-run quotes, and circuit breaker metrics on the live gateway or connect via JSON-RPC 2.0 MCP.

Related FuelRouter Architecture Guides