Skip to content

What happens during graceful shutdown? #2515

Answered by seanmonstar
GrinningSoulGH asked this question in Q&A
Discussion options

You must be logged in to vote

Graceful shutdown will try to signal shutdown intent based on what's available on the protocol:

  • In HTTP/1, it will close the connection one the next response has been written. If the connection is currently idle, waiting for a new request, it will just close instantly.
  • In HTTP/2, it will start the graceful shutdown dance by first sending a GOAWAY with the last stream set to the max. Then, after a round-trip-time, it will cap the last stream to whatever has been received so far, sending a new GOAWAY. It will then wait for all currently open streams (multiplexed requests on the same connection) to close by returning a response.

Notably, it cannot trigger shutdowns in protocols hyper doesn…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by GrinningSoulGH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants