-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
HTTP/2: to many stream window size updates after connection window size update #1643
Comments
Do you have the WINDOW_UPDATE sizes that were sent, both for the connection and each individual streams? |
Does a PCAP help? The data comes from a load generator that fills it with pseudo random values, therefore no problem sharing it here. cowboy-h2-window-update.pcapng.gz
The client in this case was NOTE: this particular PCAP also has the problem that it exceeded the |
Yes that's perfect, thank you. Considering the increment, I think it's just Cowboy handlers that have called Note that this only happens after the handlers have started calling Cowboy does not loop over all streams sending a WINDOW_UPDATE, but each stream may independently send it. It appears weird because of the nature of the test. In practice you may reduce the size read by |
Situation:
A client opens a single connection and add lots of streams. Cowboys initial window size is set to 64k for the connection and also 64k for each stream. The client send a smallish request on each stream, about 1k each. The server does not process the requests (simple slow processing).
Each request will consume 1k of the connection window size and 1k of its own stream window size. After 64k request the connection window size will be exhausted.
(not sure if it matters), due to the varying requests sizes (the requests are only about 1k), the DATA frame of the request that consumes the last piece of the connection window, will be split into 2 DATA frames.
Flow control does not apply to HEADER frames, the client can therefore continue to open new streams, but it can not send DATA frames on them since the connection window is exhausted. All those streams and requests are now stalled.
At this point some request processing finishes and a few response are sent. The
After the response, cowboy send a connection WINDOW_UPDATE with a very large window.
This is then followed up by a WINDOW_UPDATE for every single stream that had send HEADER, but no DATA frames, yet.
That last step (7.), depending on the number of pending requests, cause are rather large and IMHO unnecessary storm of stream window updates. In all the pending streams, the stream windows had enough space left so that no change was needed and the connection window update should have been enough to allow them to continue.
The text was updated successfully, but these errors were encountered: