[nginx] HTTP/2: rewritten handling of request body.

Valentin V. Bartenev vbart at nginx.com
Thu May 5 13:41:34 UTC 2016


On Wednesday 04 May 2016 18:52:24 Alexey Ivanov wrote:
> There is a small issue with setting `SETTINGS_INITIAL_WINDOW_SIZE` to 0: now when client tries to POST data it needs to wait for an additional RTT(between `send HEADERS` and `recv WINDOW_UPDATE`) to start sending data.
> 
[..]

Yes, while it's not optimal from the latency point of view, such
approach simplified implementation a lot.  So it's a fair price,
that was paid at the current stage of HTTP/2 implementation.

Introducing some kind of preread buffer will the next step.

 
> 
> Also note that `nghttp` waits for an additional RTT to send `END_STREAM` even though it a zero-length frame, despite that spec does not forbid it:
> 
> 	Frames with zero length with the END_STREAM flag set (that is, an empty DATA frame) MAY be sent if there is no available space in either flow-control window.
> 
> Therefore sending `WINDOW_UPDATE` for exactly `content-length` bytes may not be optimal for some clients.

It would be better to report this issue to nghttp, instead of
making a workaround in nginx.

There can be an implementation that even don't send another
WINDOW_UPDATE in this case.

  wbr, Valentin V. Bartenev



More information about the nginx-devel mailing list