Re: Proposed new TS API function: TSHttp2GraceShutdown

2024-06-18 Thread Fei Deng
Ok, after a short discussion with Brian Neradt, we've decided that a few tweaks to the current PR https://github.com/apache/trafficserver/pull/11046 should work. I've added a test to make sure the feature (setting "Connection: close" drains the H2 connection) works as intended. On Tue, Jun 18, 202

Re: Proposed new TS API function: TSHttp2GraceShutdown

2024-06-18 Thread Fei Deng
I didn't find a specific test that tests for connection close in H2, so I wrote a simple one this morning and confirmed that changing the header with hook TS_HTTP_SEND_RESPONSE_HDR_HOOK works. We'll have a discussion this afternoon to discuss it over. On Mon, Jun 17, 2024 at 10:52 PM Fei Deng wro

Re: Proposed new TS API function: TSHttp2GraceShutdown

2024-06-18 Thread Masakazu Kitajo
PR 8178 says: > With this change adding a header-rewrite rule to add the Connection:closed header will still work to trigger the draining logic. But core logic to clean up HTTP/1.x connections will not trigger the draining logic. It doesn't sound like the feature was taken out purposefully. I stil

Re: Proposed new TS API function: TSHttp2GraceShutdown

2024-06-17 Thread Fei Deng
Because of this? https://github.com/apache/trafficserver/pull/11046#discussion_r1583528415 The code in the HttpTransact.cc that checks for the header removes the header and never adds it back if it is a http2 connection. In an internal discussion in Yahoo I mentioned we can probably find a exact

Re: Proposed new TS API function: TSHttp2GraceShutdown

2024-06-17 Thread Masakazu Kitajo
It's a documented feature. https://docs.trafficserver.apache.org/en/9.2.x/admin-guide/plugins/header_rewrite.en.html#close-connections-for-draining https://docs.trafficserver.apache.org/en/latest/admin-guide/plugins/header_rewrite.en.html#close-connections-for-draining On Mon, Jun 17, 2024 at 8:32

Re: Proposed new TS API function: TSHttp2GraceShutdown

2024-06-17 Thread Masakazu Kitajo
Purposefully? Where did it happen? I'd say it was broken. We have that use case and need a FIX. Masakazu On Mon, Jun 17, 2024 at 6:47 PM Fei Deng wrote: > Actually it’s not possible by setting the “Connection: close” header. That > was the initial intention of PR #11046, but with all the discus

Re: Proposed new TS API function: TSHttp2GraceShutdown

2024-06-17 Thread Fei Deng
Actually it’s not possible by setting the “Connection: close” header. That was the initial intention of PR #11046, but with all the discussions it looks like that functionality was taken out purposefully. Regards, Fei Deng Sent from my iPhone On Mon, Jun 17, 2024 at 8:42 PM Masakazu Kitajo wro

Re: Proposed new TS API function: TSHttp2GraceShutdown

2024-06-17 Thread Masakazu Kitajo
It has been possible by setting "Connection: Close" header, which means that a server wants no more requests on the connection and wants to close it. If you want to close a connection on some conditions, you could check the conditions and set the header by header_rewrite (or any plugins). And thos