https://bz.apache.org/bugzilla/show_bug.cgi?id=69870
Bug ID: 69870
Summary: Add drainTimeout property to Http2Protocol for
delaying second HTTP/2 GOAWAY
Product: Tomcat 10
Version: 10.1.48
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Connectors
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ------
Currently, the HTTP/2 graceful shutdown implemented in Tomcat's
Http2UpgradeHandler uses the widely established "double-GOAWAY" where the
server, upton graceful shutdown initiation, should send a first "graceful"
GOAWAY with the maximum possible stream id followed by a final GOAWAY with the
actual last seen stream id.
The duration between these two frames is indicated by the current HTTP/2 RFC
9113 in section 6.8 "GOAWAY" as
https://datatracker.ietf.org/doc/html/rfc9113#name-goaway:~:text=(at%20least%20one%20round%2Dtrip%20time)
> (at least one round-trip time)
Tomcat currently implements this as "exactly" the RTT, using the last computed
RTT.
However, due to network conditions and server load and imprecise timers due to
OS thread scheduling delays or hypervisor-limited CPU credits (think Google
Cloud Platform E2 machine types with scheduler throttling) one RTT might race
with the client already having buffered up writes for new streams/requests
before it had the chance to see either the first or the last GOAWAY sent by
Tomcat.
In tests, those two GOAWAYs are often only a few microseconds apart.
This option should give the server a configurable additional delay between
sending the first and second/last GOAWAY during graceful shutdown to help these
situations.
There is an equivalent setting/property, "drain_timeout", in the Envoy proxy's
HTTP Connection Manager, which I used the wording "drain timeout" from.
See:
https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto#envoy-v3-api-field-extensions-filters-network-http-connection-manager-v3-httpconnectionmanager-drain-timeout
MR/PR: https://github.com/apache/tomcat/pull/917
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]