-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add overload action for closing new streams #4126
Conversation
Test failures seem unrelated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is super cool. A few high level comments to get started.
ActiveStream* stream = streams_.begin()->get(); | ||
|
||
if (overload_stop_accepting_streams_ == Server::OverloadActionState::Active) { | ||
read_callbacks_->connection().dispatcher().post([this, stream] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presumably the post here was because doing a direct response from within the newStream callback does not work? (Not surprising). Ultimately, it would be nice if the newStream() callback could do the direct response immediately without a dispatcher post, but it seems fine to indicate that via comment/TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I just tried the unit tests with a direct response and it worked fine so I'll send an update to do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not completely convinced this will work in the real server but I'm not sure. Can you look into adding an integration test? I think for this type of feature it would be great to have one. I'm thinking you could develop an overload plugin just for integration tests that you can completely control and it probably wouldn't be that hard?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will look into adding an integration test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an integration test for this. Also moved this code that drops new requests (by doing a sendLocalReply) to after envoy has decoded the client headers, rather than when we create the stream which is too early to close when using http2.
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Was OOO last week, but will get back to working on the integration test this week. |
Signed-off-by: Elisha Ziskind <eziskind@google.com>
5cd87e6
to
73bbf9f
Compare
Signed-off-by: Elisha Ziskind <eziskind@google.com>
Signed-off-by: Elisha Ziskind <eziskind@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One take-it-or-leave-it thought and question. Otherwise, looks good to me.
Signed-off-by: Elisha Ziskind <eziskind@google.com>
Signed-off-by: Elisha Ziskind <eziskind@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; some nits and then can ship.
Signed-off-by: Elisha Ziskind <eziskind@google.com>
Signed-off-by: Elisha Ziskind <eziskind@google.com>
Signed-off-by: Elisha Ziskind <eziskind@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Add an overload action in the http connection manager to immediately close new streams in case of envoy overload (issue #373).
Signed-off-by: Elisha Ziskind eziskind@google.com