shinrich edited a comment on issue #7390: URL: https://github.com/apache/trafficserver/issues/7390#issuecomment-754106041
Spent some time spelunking the code. There are HTTP/1.x and HTTP/2 scenarios. There is in fact a http2 version of the accept_no_activity_timeout setting. But let us first consider the HTTP/1 scenario. The proxy.config.http.accept_no_activity_timeout value is used to set the inactivity timeout in HttpSM::attach_client_session() which is called from ProxyTransaction::new_transaction which is called from Http1ClientSession::new_transaction which is called from Http1ClientSession::release which is called from Http1ClientSession::start which is called from ProxySession::handler_api_return on the end of the TS_HTTP_SSN_START_HOOK. attach_client_session sets the the inactivity timeout and then kicks off the TXN_START hook. Once the hook completes the HttpSM::state_read_client_request_header function is called which immediately resets the inactivity timeout to be the transaction_no_activity_timeout_in value. The state function is called via HttpSM::setup_client_read_request_header which feeds in the READ_READY in case this was a keep alive and there was already a request header in the read buffer. So the accept_no_activity_timeout really only covers the TXN_START hook time, since there is no READ_READY waiting for the first read before kicking off the set up for reading the request header. For the accept_no_activity_timeout to work as advertised (cover the gap between the connection start and the first request), this logic needs to be shoved down into the Http1ClientSession class like it is for Http2ClientSession and the http2 version of this setting. The http2 version of the setting is set in Http2ClientSession:::new_connection and is reset to the proxy.config.http2.no_activity_timeout_in when the connection_preface is read. ---------------------------------------------------------------- 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: [email protected]
