Skip to content

fix: respect gateway backoff signals - #2

Merged
jsamol merged 2 commits into
Acurast:mainfrom
lidel:fix/bound-gateway-traffic
Aug 17, 2026
Merged

fix: respect gateway backoff signals#2
jsamol merged 2 commits into
Acurast:mainfrom
lidel:fix/bound-gateway-traffic

Conversation

@lidel

@lidel lidel commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Problem

Deployed clients probe every configured gateway with GET/HEAD /ipfs/bafkqaaa every 5 seconds for as long as a node lives, and re-probe failing endpoints on every Get with no memory: the traffic described in #1. The unverified fallback also ignores Retry-After and re-asks throttled hosts on every download.

Fix

  • pin boxo to fix(bitswap/httpnet): bound probe traffic ipfs/boxo#1205: the ping loop is gone, failed probes back off (Retry-After, or 1 minute without it), and cooldowns live in a process-wide registry, so backoff survives the node-per-download lifecycle
  • the fallback now honors Retry-After on 429/502/503/504 with the same process-wide memory; content-level answers (404, 410, 403) cool nothing, since the same host may serve the next CID fine
  • covered by new tests in client/fallback_test.go; the full suite passes with -race

The boxo pin is a pseudo-version until a tagged release carries the fix, but feel free to ship this fix ASAP, we want to stop the abusive behavior described in #1.

Out of scope: which gateways are configured, which stays with #1 (requires your own fix in private repo)

lidel added 2 commits August 16, 2026 23:35
pseudo-version of ipfs/boxo#1205; removes the 5s ping loop, adds probe
backoff with Retry-After, and keeps cooldowns in a process-wide registry
that survives node-per-download recycling
429/502/503/504 start a per-host cooldown shared across Clients;
cooling hosts are skipped without a request; content-level answers
(404, 410, 403) cool nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants