-
Notifications
You must be signed in to change notification settings - Fork 107
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
fix(security): Randomly drop connections when inbound service is overloaded #6790
Merged
Conversation
This file contains 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
teor2345
added
C-bug
Category: This is a bug
P-Medium ⚡
C-security
Category: Security issues
I-hang
A Zebra component stops responding to requests
A-network
Area: Network protocol updates or fixes
A-concurrency
Area: Async code, needs extra work to make it work properly.
I-remote-trigger
Remote nodes can make Zebra do something bad
labels
May 30, 2023
github-actions
bot
added
the
C-trivial
Category: A trivial change that is not worth mentioning in the CHANGELOG
label
May 30, 2023
teor2345
requested review from
arya2 and
oxarbitrage
and removed request for
a team and
upbqdn
May 30, 2023 03:21
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6790 +/- ##
==========================================
+ Coverage 77.99% 78.17% +0.17%
==========================================
Files 308 308
Lines 40975 41023 +48
==========================================
+ Hits 31960 32071 +111
+ Misses 9015 8952 -63 |
teor2345
force-pushed
the
randomly-keep-overloaded-conns
branch
from
May 31, 2023 00:47
ae836a6
to
ca23d02
Compare
Sorry for the doctest compile errors, I didn't catch them locally. (Next time I'll fix the test API separately.) |
arya2
approved these changes
May 31, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-concurrency
Area: Async code, needs extra work to make it work properly.
A-network
Area: Network protocol updates or fixes
C-bug
Category: This is a bug
C-security
Category: Security issues
C-trivial
Category: A trivial change that is not worth mentioning in the CHANGELOG
I-hang
A Zebra component stops responding to requests
I-remote-trigger
Remote nodes can make Zebra do something bad
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
Zebra should avoid dropping all peer connections when the inbound service is overloaded by a subset of peers.
This PR will randomly drop connections that get an overloaded error, with a high probability
Closes #6596.
Solution
ServiceShutdown
variant toPeerError
for when the inbound service has failed or shutdown.Testing:
Related fixes:
Review
This is a routine fix.
The production code has already been reviewed privately, the tests are new.
Reviewer Checklist
Follow Up Work