fix: auto data frame budget - #3
Merged
Merged
Conversation
…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.
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.
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).
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.