Allow GOAWAY to be sent from handlers after the Http2MultiplexCodec#6480
Closed
exell-christopher wants to merge 1 commit into
Closed
Allow GOAWAY to be sent from handlers after the Http2MultiplexCodec#6480exell-christopher wants to merge 1 commit into
exell-christopher wants to merge 1 commit into
Conversation
Member
|
LGTM... @Scottmitch @nmittler PTAL |
Member
|
Also maybe @buchgr |
Scottmitch
requested changes
Mar 2, 2017
Member
There was a problem hiding this comment.
we need to call goAwayFrame.release() when we are done with goAwayFrame
Member
There was a problem hiding this comment.
looks like we missed a call to ReferenceCountUtil.release(frame); previously ... can you add this?
…o that app developers can shed load by issuing GOAWAY
e9f5b80 to
ca20d54
Compare
Author
|
Changes Committed. |
Member
|
4.1 (52aecab) Thanks @exell-christopher ! |
Member
|
FYI: I think this was previously possible by writing the GOAWAY to the Channel.parent(). |
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.
Motivation:
When a server is load-shedding or preparing to shut-down gracefully, it would be nice to be able to issue a GOAWAY so that existing requests can finish, but new requests are turned away. The Http2FrameCodec seems to have all the correct handling for this, but the Http2MultiplexCodec does not allow for anything other than an Http2StreamFrame to be written. As far as I can tell server developers have no way to send a GOAWAY without extending the Http2MultiplexCodec itself which doesn't seem ideal.
Modification:
Update the write() functionality of the the Http2MultiplexCodec to allow Http2GoAwayFrame and Http2StreamFrame to be written.
Added one test, but feel like there may need to be more, just not sure at which level they need to be added.
My read through of the spec indicates that this shouldn't violate any rules.