fix: respect gateway backoff signals - #2
Merged
Conversation
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
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Deployed clients probe every configured gateway with
GET/HEAD /ipfs/bafkqaaaevery 5 seconds for as long as a node lives, and re-probe failing endpoints on everyGetwith no memory: the traffic described in #1. The unverified fallback also ignoresRetry-Afterand re-asks throttled hosts on every download.Fix
Retry-After, or 1 minute without it), and cooldowns live in a process-wide registry, so backoff survives the node-per-download lifecycleRetry-Afteron 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 fineclient/fallback_test.go; the full suite passes with-raceThe 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)