HTTP2 receiver window size does not seem to expand
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.3k
- Forks
- 1.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 14
Description
This test program downloads a 281MB file from AWS S3 using hyper-rustls with HTTP2 enabled:
https://github.com/rocallahan/http2-window-size-bug/blob/master/src/main.rs
On a AWS c5d.9xl instance, it takes a few minutes. If you disable HTTP2 in the example, or use curl/wget, it takes a few seconds.
Calling http2_initial_stream_window_size to set SETTINGS_INITIAL_WINDOW_SIZE to 2^31 - 1 fixes the problem completely.
My understanding is that client stacks should automatically expand the HTTP2 stream window size while no backpressure is needed, like TCP does, but it appears that isn't happening.
If the intent is that hyper should not manage stream window sizes, okay, but in that case reqwest should.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the HTTP/2 download with the linked example at src/main.rs, comparing the default behavior with http2_initial_stream_window_size set explicitly. Trace how the receiver stream window is managed and determine the intended behavior for a large download; done means the behavior is clarified and covered by an appropriate regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100