Skip to content

check server side max streams when proxying - #6

Merged
molocule merged 2 commits into
richard/lossy-subrequestfrom
claudia/honor-remote-max-concurrent-streams
Aug 10, 2026
Merged

check server side max streams when proxying#6
molocule merged 2 commits into
richard/lossy-subrequestfrom
claudia/honor-remote-max-concurrent-streams

Conversation

@molocule

@molocule molocule commented Aug 6, 2026

Copy link
Copy Markdown

use server side max streams when proxying

molocule and others added 2 commits August 5, 2026 23:52
spawn_stream() admitted streams against the configured max_h2_streams
only, snapshotted before the server's initial SETTINGS frame is
processed. A server advertising a lower limit (e.g. the worker HTTP
relay's per-connection stream cap) caused excess requests to queue
silently inside h2 — parked in ready() behind long-lived streams until
the downstream deadline killed them — instead of signaling the caller
to dial another connection.

- Re-read current_max_send_streams() on every admission and admit
  against min(configured, advertised).
- Bound the ready() wait: a connection at its real capacity reports
  "no free stream" so the caller dials instead of queueing.
- Fix a counter leak when spawn_stream() is cancelled mid-wait.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@molocule
molocule merged commit 5b463bd into richard/lossy-subrequest Aug 10, 2026
1 check passed
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.

1 participant