switch per per-IP to per-UUID rate limiting #146
Closed
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.
I rolled out per-IP rate limiting in our network, but it turns out that even rates as low as 20 connections per 10 minutes are problematic. I am not sure what exactly these misbehaving clients are doing; probably the actual issue is not the load caused by these connection attempts but by other things they do.
Doing the limiting per-UUID lets me reduce the threshhold to something like "max 5 connections per 2 minutes". I would not want to do that per-IP, because people might run 5 nodes behind the same IP and then that limit is reached too easily.
Cc @RobWei does per-UUID rate limiting work for you, or do you require a per-IP limit?
Fixes #144