prefer Prefix · exclude Filter · Safety-First Overrides

Deterministic prefer & exclude Upstream Routing Overrides

Sometimes a workload needs a specific upstream first—such as a low-latency DNS node or a JS-rendered extractor—or must exclude a vendor for regional compliance. FuelRouter supports deterministic prefer and exclude overrides without ever bypassing circuit breaker or budget protections.

Caller Routing Override Precedence & Safety Rules

Override FieldAccepted ValuesRanking EffectHard Safety Boundary
preferList of upstream_id stringsAssigns primary rank prefix 0 in listed order ahead of non-preferred (1)Skipped automatically if OPEN, quota-exhausted, or over max_cost_micros
excludeList of upstream_id or domain_id stringsRemoves matching upstreams before sortingApplied unconditionally; never routed even during failover
force_refreshBoolean (default false)Bypasses cache read path to execute preferred live routeStill runs full Anti-Fake-200 gate before cache update
max_cost_microsInteger micro-USD ceilingFilters out wholesale upstreams exceeding budgetOverrides prefer if preferred upstream exceeds budget

Safety-Preserving Preference Pinning

Hardcoding a vendor override in application code re-introduces single points of failure. In FuelRouter, passing prefer: ["scrape_browserbase_free"] promotes that upstream to the head of the eligible list only while its circuit is CLOSED (or ready for a HALF_OPEN probe), its RPM/RPD/monthly quotas have headroom, and its unit cost fits inside max_cost_micros.

If the preferred upstream trips OPEN or encounters a CAPTCHA soft-ban, FuelRouter falls back automatically to the next ranked pool candidate within the same request.

Compliance Exclusions by Upstream ID or Domain ID

Regional data-residency or vendor-blocklist policies can pass exclude: ["domain_id_or_upstream_id"] on every quote and dispatch call. Excluded nodes are removed during Step 1 eligibility filtering and never receive traffic.

Callers can preview the exact post-override failover sequence at $0 cost via POST /v1/router/quote.

Prefer a Fast DNS Upstream While Excluding Specific Hosts

curl -fsSL -X POST "https://fuelrouter.fastmesh.dev/v1/router/dispatch" \
  -H "Content-Type: application/json" \
  -d '{
    "pool_id": "b2b_domain_dns_enrichment",
    "tenant_id": "dns_audit_bot",
    "inputs": {"domain": "fastmesh.dev", "include_dns": true},
    "prefer": ["enrich_cloudflare_dns_free"],
    "exclude": ["enrich_alphavantage_free"],
    "max_cost_micros": 80000
  }'

Routing Override Operational Guidelines

Frequently Asked Technical Questions

Can prefer force FuelRouter to call an OPEN circuit or over-budget upstream?

No. Eligibility filters (circuit state, sliding-window quota, and max_cost_micros) always run before preference ranking.

Can I pass domain_id values inside the exclude array?

Yes. The eligibility filter matches both upstream_id and domain_id against caller exclude entries.

What happens if all non-excluded upstreams fail?

FuelRouter respects your exclude list strictly, never calls an excluded upstream, and returns HTTP 503 with charged_micros: 0.

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