Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When in graceful shutdown, send GO_AWAY to notify the client to stop opening streams #2758

Merged
merged 1 commit into from
Apr 5, 2023

Conversation

violetagg
Copy link
Member

Configure Http2FrameCodec with indefinite graceful shutdown timeout as the scheduling happens with ServerTransport#disposeNow

https://datatracker.ietf.org/doc/html/rfc9113#GOAWAY

The GOAWAY frame (type=0x07) is used to initiate shutdown of a connection... GOAWAY allows an endpoint to gracefully
stop accepting new streams while still finishing processing of previously established streams.
Once the GOAWAY is sent, the sender will ignore frames sent on streams initiated by the receiver if the stream has an
identifier higher than the included last stream identifier. Receivers of a GOAWAY frame MUST NOT open additional streams
on the connection...
A GOAWAY frame might not immediately precede closing of the connection
Activity on streams numbered lower than or equal to the last stream identifier might still complete successfully. The sender
of a GOAWAY frame might gracefully shut down a connection by sending a GOAWAY frame, maintaining the connection in
an "open" state until all in-progress streams complete.

Fix #2735

Configure Http2FrameCodec with indefinite graceful shutdown timeout
as the scheduling happens with ServerTransport#disposeNow

https://datatracker.ietf.org/doc/html/rfc9113#GOAWAY

"The GOAWAY frame (type=0x07) is used to initiate shutdown of a connection...
GOAWAY allows an endpoint to gracefully stop accepting new streams while
still finishing processing of previously established streams."

"Once the GOAWAY is sent, the sender will ignore frames sent on streams initiated
by the receiver if the stream has an identifier higher than the included last stream identifier.
Receivers of a GOAWAY frame MUST NOT open additional streams on the connection..."

"A GOAWAY frame might not immediately precede closing of the connection"

"Activity on streams numbered lower than or equal to the last stream identifier might still complete successfully.
The sender of a GOAWAY frame might gracefully shut down a connection by sending a GOAWAY frame,
maintaining the connection in an "open" state until all in-progress streams complete."

Fix #2735
@violetagg violetagg added the type/bug A general bug label Mar 31, 2023
@violetagg violetagg added this to the 1.0.31 milestone Mar 31, 2023
@violetagg violetagg requested a review from a team March 31, 2023 16:02
@violetagg violetagg changed the title When in graceful shutdown, send GO_AWAY to notify the client When in graceful shutdown, send GO_AWAY to notify the client to stop opening streams Mar 31, 2023
Copy link
Member

@pderop pderop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me.

@violetagg violetagg merged commit c1b9631 into 1.0.x Apr 5, 2023
@violetagg violetagg deleted the issue-2735 branch April 5, 2023 06:39
violetagg added a commit that referenced this pull request Apr 5, 2023
violetagg added a commit that referenced this pull request Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug A general bug
Projects
None yet
2 participants