Skip to content
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 rate limiting for incoming requests #119

Merged
merged 4 commits into from
Oct 20, 2023
Merged

Conversation

ffilippopoulos
Copy link
Member

This implements 2 separate rate limiters:

  • One per requests coming from peer that has an open stream to the server
  • One for all the incoming requests to the server. The first one will limit bad actors, while the second one can be used to limit max memory and avoid throttling
    Maybe the defaults are a bit shy and can re-evaluate after some time running on dev environments.
    Also, this improves logging by adding peers IPs on stream requests.

This implements 2 separate rate limiters:
- One per requests coming from peer that has an open stream to the
  server
- One for all the incoming requests to the server.
The first one will limit bad actors, while the second one can be used to
limit max memory and avoid throttling
Maybe the defaults are a bit shy and can re-evaluate after some time
running on dev environments.
Also, this improves logging by adding peers IPs on stream requests.
@ffilippopoulos ffilippopoulos merged commit 462d6d1 into master Oct 20, 2023
7 checks passed
@ffilippopoulos ffilippopoulos deleted the rate-limit-requests branch October 20, 2023 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants