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 05:05:43 UTC

[GitHub] [trafficserver] zizhong opened a new issue #6899: request buffer doesn't work with the new HTTP2 WINDOW_UPDATE sending logic

zizhong opened a new issue #6899:
URL: https://github.com/apache/trafficserver/issues/6899


   With https://github.com/apache/trafficserver/pull/6643/commits/16e093792acc639fe71d71e95fb80c7b1d25bf0c, the client can only send up to SETTINGS_INITIAL_WINDOW_SIZE bytes.
   @masaori335 can share details of his test that reproduced this issue.


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
masaori335 edited a comment 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.
   
   ## Another approach to fix the root cause
   
   It's another approach that checking the feature is enabled on the logic that stops updating the window. Probably, we can refer the config through Http2Stream and HttpSM.
   ## TODOs
   
   - [ ] 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



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

Posted by GitBox <gi...@apache.org>.
masaori335 closed issue #6899:
URL: https://github.com/apache/trafficserver/issues/6899


   


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
zizhong commented on issue #6899:
URL: https://github.com/apache/trafficserver/issues/6899#issuecomment-644535879


   @masaori335 
   
   ``` test 1
   CONFIG proxy.config.http.request_buffer_enabled INT 1
   CONFIG proxy.config.http.post_copy_size INT 1073741824
   - with HTTP/1.1, ATS buffers whole request body
   - with HTTP/2, ATS stop accepting 73KB ( this is looks like 64KB + 8 KB ) 


----------------------------------------------------------------
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



[GitHub] [trafficserver] zizhong edited a comment on issue #6899: request buffer doesn't work with the new HTTP2 WINDOW_UPDATE sending logic

Posted by GitBox <gi...@apache.org>.
zizhong edited a comment on issue #6899:
URL: https://github.com/apache/trafficserver/issues/6899#issuecomment-644535879


   From @masaori335 ,
   
   ``` test 1
   CONFIG proxy.config.http.request_buffer_enabled INT 1
   CONFIG proxy.config.http.post_copy_size INT 1073741824
   - with HTTP/1.1, ATS buffers whole request body
   - with HTTP/2, ATS stop accepting 73KB ( this is looks like 64KB + 8 KB ) 


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
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