Repository navigation
fix(pod): pause a server only after it refused with a status - #1093
Merged
Merged
Conversation
The rate-limit gate keeps one wait per origin, shared by the learner's own pod requests and the reads made as no one. A request that failed with no status counted as a refusal when it was the third such failure within two seconds, and every failure counted that way let the next one count too. An address the browser refuses to send, such as one with a user name, fails that way on every try, so a few such addresses from a foreign instance or a catalog entry on the learner's pod origin paused every request to that pod, study answers included. A request's first wait at the gate also had no limit, so the pause held it for as long as other requests kept making it longer. A failure with no status now counts as a refusal only after the server has refused a request with a real 429 or 503: while the wait it asked for lasts, or within a minute of that refusal, and a failure counted that way no longer extends that minute. Any other such failure is that request's alone. A request whose wait at the gate, its first included, would end more than three minutes after it arrived fails with podBusy, a write's as much as a read's. Addresses from data with a user name or password are refused by isPlainHttpUrl, and with it by every check of document, instance and release addresses. The gate paces only http: and https: addresses without a user name or password, and passes any other on unpaced, so its failure touches no server's wait. The waits the learner is told of name a server as not answering only after it sent a status. docs/architecture.md and docs/interop.md describe the narrowed rule. Refs: GHSA-8gm4-9qgf-hvg3
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.
What and why
The rate-limit gate keeps one wait per server, shared by the learner's own pod requests and the reads made as no one. A request that failed with no status counted as a refusal when it was the third such failure within two seconds. Some addresses the browser refuses to send fail that way on every try. A few of them on the learner's pod origin could pause every request to that pod, study answers included. A request's first wait at the gate also had no limit.
podBusy.isPlainHttpUrlrefuses addresses with a user name or password, and so does every check of document, instance and release addresses built on it.http:andhttps:addresses without user info. It passes any other address through unpaced, so a failure there never touches a server's wait.docs/architecture.mdanddocs/interop.mddescribe the narrower rule. A proxy that sends 429s without CORS headers, and never a 429 the browser can read, is no longer recognized as rate limiting.Refs: GHSA-8gm4-9qgf-hvg3