Skip to content

fix: auto data frame budget - #3

Merged
igorbdl merged 2 commits into
v0.4.19-denolandfrom
fix-auto-data-frame-budget
Aug 26, 2026
Merged

fix: auto data frame budget#3
igorbdl merged 2 commits into
v0.4.19-denolandfrom
fix-auto-data-frame-budget

Conversation

@igorbdl

@igorbdl igorbdl commented Aug 26, 2026

Copy link
Copy Markdown

adaptive_window servers (hyper) hand h2 the 64 KiB spec-minimum connection window at construction and grow the target later from BDP samples. The Auto DATA-frame budget is resolved once, from that initial window, so every such connection runs at the smallest budget Auto can produce — 32 KiB, ~130 sub-256-byte DATA frames — for its whole life, and honest clients streaming request bodies in small chunks are killed with GOAWAY ENHANCE_YOUR_CALM. This is what broke Deploy builds/bucket-sync on prod after the 0.4.13 → 0.4.19 upgrade (upstream context: hyperium#944, whose fix hyperium#946 derives the budget from the configured window and so doesn't cover the adaptive case).

  • a1d7bc7: store the budget mode in Counts and re-derive an Auto budget whenever set_target_window_size raises the window. Grow-only, so a peer shrinking its window can't retroactively overdraw a spent balance; Configured budgets untouched.
  • 55932e8: both exhaustion paths (small-frame budget, empty-frame limit) shared one error, one GOAWAY payload, and debug-only logging — operators couldn't tell which rule killed a connection, or that one fired at all. Warn once per connection kill, with the limit that fired.

Both are upstream candidates. Note deployd itself no longer runs adaptive servers (explicit windows since the incident fix), so on deployd the first commit is dormant insurance and the second is the live monitoring signal.

…window changes

The Auto budget is documented as scaling with the connection window, but it is resolved once, from the window the connection was built with. A server that autotunes the window afterwards — hyper's adaptive_window starts every connection at the 64 KiB spec minimum and grows the target from BDP samples — is stuck on the smallest budget Auto can produce (32 KiB, ~130 small DATA frames) for the life of the connection, so honest clients streaming bodies in small chunks are killed with GOAWAY ENHANCE_YOUR_CALM. Store the budget mode in Counts and grow the budget when set_target_window_size raises the window; grow-only, so a peer shrinking its window cannot retroactively overdraw a spent balance. Configured budgets are unchanged.
Both exhaustion paths — the small-frame budget and the empty-frame limit — share an error type and GOAWAY payload and logged only at debug level, so an operator cannot tell which rule killed a connection, or that a limit fired at all. Log each at warn with the limit that fired; one line per connection kill, so it cannot spam.
@igorbdl
igorbdl merged commit ecac9b0 into v0.4.19-denoland Aug 26, 2026
5 of 6 checks 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