Add an optional idle timeout for downstream HTTP/2 connections#899
Open
acoshift wants to merge 1 commit into
Open
Add an optional idle timeout for downstream HTTP/2 connections#899acoshift wants to merge 1 commit into
acoshift wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The downstream H2 accept loop (
accept_downstream_sessions) only ends when the client closes the connection, a codec error occurs, or the runtime graceful-shutdown ceiling fires. A client that completes the handshake and then sends no streams keeps the whole connection alive indefinitely.Add an opt-in
HttpServerOptions::h2_idle_timeout. When set, a connection that has accepted no new stream and has no request in flight for that duration is closed. In-flight streams are tracked via aStreamGuardhanded to the per-session callback. The idle timer is re-armed each loop iteration, so any stream activity resets it; on fire with nothing in flight the loop returns, dropping the connection and closing the socket immediately.