Skip to content

fix(pod): pause a server only after it refused with a status - #1093

Merged
ixuz merged 1 commit into
mainfrom
fix/rate-limit-status-only
Nov 28, 2026
Merged

ixuz merged 1 commit into
mainfrom
fix/rate-limit-status-only

Conversation

@ixuz

@ixuz ixuz commented Nov 28, 2026

Copy link
Copy Markdown
Member

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.

  • A failure with no status now counts as a refusal only after the server has sent a real 429 or 503: while the wait it asked for lasts, or within a minute of that refusal. A failure counted that way no longer extends that minute. Any other such failure fails only its own request.
  • Every wait at the gate is bounded, the first one included, for writes as well as reads. A request that would wait past three minutes fails with podBusy.
  • isPlainHttpUrl refuses addresses with a user name or password, and so does every check of document, instance and release addresses built on it.
  • The gate paces only http: and https: addresses without user info. It passes any other address through unpaced, so a failure there never touches a server's wait.
  • docs/architecture.md and docs/interop.md describe 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

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
@ixuz ixuz added bug Something isn't working interop labels Nov 28, 2026
@ixuz
ixuz enabled auto-merge November 28, 2026 15:56
@ixuz
ixuz added this pull request to the merge queue Nov 28, 2026
Merged via the queue into main with commit 98c69e1 Nov 28, 2026
57 checks passed
@ixuz
ixuz deleted the fix/rate-limit-status-only branch November 28, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working interop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant