Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid send window update for every data received #30

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gongzhengyang
Copy link

Use the same logic of connection window update to avoid send window update for every data received.

@gongzhengyang
Copy link
Author

In the bidirection stream scenario when sent and receive date frequently. By using the same window update logic as the connection level, it could reducing the frequency of window updates and so significantly reduce the bandwidth.

@gongzhengyang
Copy link
Author

HTTP/2 defines only the format and semantics of the WINDOW_UPDATE frame (Section 6.9). This document does not stipulate how a receiver decides when to send this frame or the value that it sends, nor does it specify how a sender chooses to send packets. Implementations are able to select any algorithm that suits their needs.

I checked the HTTP2 rfc9113 for the detail of WINDOW_UPDATE, so maybe this change is justified.
https://datatracker.ietf.org/doc/html/rfc9113#WINDOW_UPDATE

@gongzhengyang
Copy link
Author

@tsloughter Hi, do you have time to take a look at this change?

@tsloughter
Copy link
Owner

A little worried about this change based on comments like this in other projects, haproxy/haproxy#2245 (comment)

Maybe we need an optimization like If you send 100 streams at once, you'll get a single WU for the connection.?

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.

2 participants