-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Post large file failed when the initialWindowSize of HTTP2 Settings Object set to 6553500 #19141
Comments
/cc @nodejs/http2 |
@jasnell what do you think? |
I still need to actually test this but two things:
@jasnell thoughts? |
Oy, just spotted this. It ended up buried in a backlog. Will investigate. |
I am unable to replicate any issues here with the current code in master. It is possible that the 9.x branch was simply out of date. I will be opening a PR with a test that transfers 100 MB of data from client to server with a large initial window size that confirms that it should be working end to end. |
Now that #22254 is landed, let's call this resolved. |
Refs: nodejs#19141 PR-URL: nodejs#22254 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Refs: nodejs#19141 PR-URL: nodejs#22254 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Refs: #19141 Backport-PR-URL: #22850 PR-URL: #22254 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Version: 9.5.0
Platform: Windows7 x64 / Windows10 x64
Subsystem: node_http2
It is required to post large file (~100MB) to a HTTP/2 server in a project, we implement the HTTP/2 server using node.js v9.5.0.
The speed is too low when comparing to HTTPS when post via HTTP/2 with the default settings. It was the reason the TCP package sending speed is too low after we checked a lot of captured package. So, we had to adjust the initialWindowSize of HTTP2 Settings Object quite larger than the default value (65535), to 6553500.
After that, we got an error from the client saying the connection timeout during the file transition. And more we found is the WINDOW_SIZE is not updated by the server anymore. We had to analysis the node.js source code without helpful searching result from the internet. In the node_http2.c, we found it only set the stream level WINDOW_SIZE when we adjust initialWindowSize of HTTP2 Settings Object, left the session level one. That is the root reason cause the HTTP/2 server stopping update the WINDOW_SIZE.
NGHTTP2 lib has provided the API interface to modify both the stream and session level WINDOW_SIZE, so we temporarily modify Http2Session::Http2Settings::Send() to call the API (nghttp2_session_set_local_window_size()) with the stream_id = 0 when the stream level WINDOW_SIZE > session level WINDOWS_SIZE.
We are still looking for the best solution...
Thanks for any help!
The text was updated successfully, but these errors were encountered: