Skip to content

Avoid send window update for every data received#30

Open
gongzhengyang wants to merge 3 commits into
tsloughter:masterfrom
gongzhengyang:master
Open

Avoid send window update for every data received#30
gongzhengyang wants to merge 3 commits into
tsloughter:masterfrom
gongzhengyang:master

Conversation

@gongzhengyang

Copy link
Copy Markdown

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

@gongzhengyang

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Author

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

@tsloughter

Copy link
Copy Markdown
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