-
Notifications
You must be signed in to change notification settings - Fork 853
Don't be overly aggressive on stream failures and closing #6525
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -250,7 +250,8 @@ class Http2ConnectionState : public Continuation | |
| get_stream_error_rate() const | ||
| { | ||
| int total = get_stream_requests(); | ||
| if (total > 0) { | ||
|
|
||
| if (total >= (1 / Http2::stream_error_rate_threshold)) { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The point of this is to require a minimum number of samples before we can calculate a reasonably trustworthy rate of failures. The smaller the threshold, the more samples needed. Probably not statistically safe, but this at least avoids the issues where if (in the default configs) any of the first 10 streams has an error, it's enough to close the connection. |
||
| return (double)stream_error_count / (double)total; | ||
| } else { | ||
| return 0; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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 was only done to make the Warning() consistent with the other two places we do this check.
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.
Adding configured threshold value is fine, but removing "too high" would make it hard to see whether the close was graceful or immediate.