GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Post large file failed when the initialWindowSize of HTTP2 Settings Object set to 6553500 · Issue #19141 · nodejs/node

Post large file failed when the initialWindowSize of HTTP2 Settings Object set to 6553500 #19141

New issue
Copy link
New issue
Copy link
Closed
Closed
Post large file failed when the initialWindowSize of HTTP2 Settings Object set to 6553500#19141
Copy link
Assignees
apapirovski
Labels
http2Issues and PRs related to the http2 subsystem.

Description

@SeaOceanLiu
SeaOceanLiu
opened on Mar 5, 2018
Issue body actions

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!

Activity

  1. bzoz commented on Mar 8, 2018

    @bzoz
    bzoz
    on Mar 8, 2018
    Contributor
    More actions

    /cc @nodejs/http2

  2. mcollina commented on Mar 8, 2018

    @mcollina
    mcollina
    on Mar 8, 2018
    SponsorMember
    More actions

    @jasnell what do you think?

  3. trivikr
    added
    http2Issues and PRs related to the http2 subsystem.
    on Mar 25, 2018
  4. apapirovski
    self-assigned this
    on Jun 24, 2018
  5. apapirovski commented on Jun 24, 2018

    @apapirovski
    apapirovski
    on Jun 24, 2018
    Contributor
    More actions

    I still need to actually test this but two things:

    1. The fact that a window update is not being propagated seems to either be an nghttp2 bug or with whatever client is being used. The C++ code consumes data as it comes in, so the blame can't be there.

    2. I'm not really certain what the correct behaviour here is. I'm leaning towards exposing an additional initialConnectionWindowSize option because I'm not convinced that changing initialWindowSize should affect the connection level flow-control window.

    @jasnell thoughts?

  6. jasnell commented on Aug 10, 2018

    @jasnell
    jasnell
    on Aug 10, 2018
    Member
    More actions

    Oy, just spotted this. It ended up buried in a backlog. Will investigate.

  7. jasnell commented on Aug 10, 2018

    @jasnell
    jasnell
    on Aug 10, 2018
    Member
    More actions

    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.

  8. jasnell
    added a commit that references this issue on Aug 10, 2018

    test: add test-http2-large-file sequential test

    0b3ae42
  9. gdams
    added a commit that references this issue on Aug 13, 2018

    test: add test-http2-large-file sequential test

    c29aff3
  10. rvagg
    added a commit that references this issue on Aug 15, 2018

    test: add test-http2-large-file sequential test

    dc57d4e
  11. TimothyGu commented on Aug 18, 2018

    @TimothyGu
    TimothyGu
    on Aug 18, 2018
    Member
    More actions

    Now that #22254 is landed, let's call this resolved.

  12. TimothyGu
    closed this as completedon Aug 18, 2018
  13. kjin
    added a commit that references this issue on Oct 16, 2018

    test: add test-http2-large-file sequential test

    81f3ebc
  14. firass111
    added a commit that references this issue on Apr 16, 2025

    test: add test-http2-large-file sequential test

    a414b07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @apapirovski
    apapirovski

Labels

http2Issues and PRs related to the http2 subsystem.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.