Repository navigation
fix(io): a metered origin keeps its pinned redirect target (#307 follow-up) - #323
Merged
Merged
Conversation
…ow-up) The #308 ladder dropped the post-redirect pin on a rate-limit streak as well as on a zero-progress one. 429/503 says the origin is metering us, not that the redirect target is dead (#71), and re-resolving sends the retry back through the source URL for a fresh redirect: a second request against the origin that is already refusing them. On the connection-capped panel behind #307 that is the request there is no room for. The hard-5xx arm and the zero-progress arm are unchanged, and the metered case has a test now. Also fixes a double close in the new `ThrottledOriginServer` dropConnection directive: `serve` leaves closing to `stop()`, which closes every fd still in `_connFDs`, so closing there frees a descriptor number the process can hand to the next socket before `stop()` runs. Re #307. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01HX5zV3Fcf7Nzq4DYGdXvQE
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.
Follow-up to #308 (merged). Re #307, which stays open until the reporter retests on the device.
The pin and rate limiting. #308 dropped the post-redirect pin after two consecutive failures of either kind, including a 429/503 streak, while its own rationale (and the CHANGELOG entry) says a metered origin keeps it. Metering says the origin is refusing requests right now, not that the redirect target is dead (#71), and re-resolving sends the retry back through the source URL for a fresh redirect: a second request against the origin that is already refusing them. On the
max_connections=1panel behind #307 that is exactly the request there is no room for. The hard-5xx arm and the zero-progress arm are unchanged.Test-origin double close. The new
dropConnectiondirective didshutdown+closeon a descriptor that stays in_connFDs, andstop()closes every fd in there. Between the two, the process can hand that descriptor number to a new socket, andstop()would then shut down whatever took it over. Deregister first, then close once.Test plan
a rate-limited refill keeps the pin instead of re-resolving through the source(302 source to CDN, CDN meters the first two boundary attempts, then serves). Fails on the pre-follow-up condition (the source sees a boundary hit), passes now. Its suite gained.serializedbecause it mutates the backoff-scale hook.swift teston macOS 26: 1545 tests / 230 suites green.