You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by GitBox <gi...@apache.org> on 2020/06/16 06:03:58 UTC

[GitHub] [trafficserver] masaori335 commented on issue #6899: request buffer doesn't work with the new HTTP2 WINDOW_UPDATE sending logic

masaori335 commented on issue #6899:
URL: https://github.com/apache/trafficserver/issues/6899#issuecomment-644550392


   ## Summary
   
   After `50441b39e6631389ef95c4133f06bbf94544879c` (#6643) change, if the request buffer feature[*1] is enabled, POST requests (over 65535) on HTTP/2 connection are stalled.
   
   *1 : [proxy.config.http.request_buffer_enabled](https://docs.trafficserver.apache.org/en/latest/admin-guide/files/records.config.en.html#proxy-config-http-request-buffer-enabled)
   
   ## Root cause
   
   ATS sends WINDOW_UPDATE frames only if the buffer is consumed & buffering data is small enough. However, when the request buffer feature is enabled, the buffer is not consumed intentionally.
   
   https://github.com/apache/trafficserver/blob/50441b39e6631389ef95c4133f06bbf94544879c/proxy/http2/Http2ConnectionState.cc#L1303-L1307
   
   ## Workaround Fix
   
   A workaround fix is adjust `proxy.config.http2.initial_window_size_in` to the same value to the `proxy.config.http.post_copy_size`. For example in above, it will be below
   
   ```
   CONFIG proxy.config.http.request_buffer_enabled INT 1
   CONFIG proxy.config.http.post_copy_size INT 1073741824
   CONFIG proxy.config.http2.initial_window_size_in INT 1073741824
   ```
   
   We can use this workaround fix up to buffering 2^31 - 1 (2,147,483,647) bytes, which is the maximum value of HTTP/2 flow-control window size. ( [rfc7540#section-6.5.2](https://tools.ietf.org/html/rfc7540#section-6.5.2) )
   However, we can't apply this on a specific remap, because `proxy.config.http2.initial_window_size_in` is a global config.
   
   ## TODOs
   
   - [ ] Check the feature is enabled on the logic that stops updating window
   - [ ] Add test cases to cover this (#6901)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org