[Cronet] Add an API to set initial window size for H2 |
||||||||
Issue descriptionH2's default initial window size is 65535 bytes (https://code.google.com/p/chromium/codesearch#chromium/src/net/spdy/spdy_session.h&l=549). This might cause stalls on connections with a high bandwidth-delay product. It is suggested that we expose an API for developers to set SETTINGS_INITIAL_WINDOW_SIZE.
,
Apr 26 2016
,
May 17 2016
,
Jun 13 2016
Bumping this down to a P3. It'd be nice to get this in milestone beyond M53
,
Jun 20 2016
I think we would need this API on both Android and iOS. Does it make sense to add this as a parameter for CronetEngine, or do we need it on per-UrlRequest basis? Do I understand correctly that the initial window size is only used when H2 session is established?
,
Jun 20 2016
The initial window size advertised by the client determines how much data the server can send on a newly opened stream before waiting for a window update. The initial window size is usually only negotiated at the beginning of a HTTP2 session, but it is used for every new stream. If Cronet does not provide users a way to set the initial window size or otherwise update flow control, then HTTP2 peers will only be able to send 64kB of data at a time, even if the BDP of the connection is much higher.
,
Jun 20 2016
Agreed - this is likely needed on CronetEngine. Arguably you'd want to be able to specify on a per-origin basis but also OK with changing the default globally.
,
Aug 30 2016
,
Aug 30 2016
,
Aug 30 2016
Chromium currently has a session-level window size of 15 MB and a stream-level window size of 6 MB. It is defined at [1], which sets HttpNetworkSession::Params members, which get passed to SpdySessionPool, which get passed to SpdySession, which sends out the SETTINGS_INITIAL_WINDOW_SIZE value in the initial SETTINGS frame for the stream level window size [2], and sends a WINDOW_UPDATE frame for the session level window size [3], both in SendInitialData(). Also see the spec [4] for more details. I believe these values guarantee that network bandwidth-delay-product is fully utilized, so I am closing this bug as WontFix. Some autotuning of window sizes would be desirable, but that's beyond the scope of this issue. [1] https://cs.chromium.org/chromium/src/net/http/http_network_session.cc?q=kSpdySessionMaxRecvWindowSize [2] https://cs.chromium.org/chromium/src/net/spdy/spdy_session.cc?q=SETTINGS_INITIAL_WINDOW_SIZE&l=2716 [3] https://cs.chromium.org/chromium/src/net/spdy/spdy_session.cc?q=IncreaseRecvWindowSize&l=2730 [4] http://httpwg.org/specs/rfc7540.html#InitialWindowSize |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by xunji...@chromium.org
, Apr 15 2016