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

Implement rate limit #3451

Closed
twoeths opened this issue Nov 22, 2021 · 3 comments · Fixed by #3454
Closed

Implement rate limit #3451

twoeths opened this issue Nov 22, 2021 · 3 comments · Fixed by #3454
Assignees

Comments

@twoeths
Copy link
Contributor

twoeths commented Nov 22, 2021

Is your feature request related to a problem? Please describe.

We don't want to serve beacon_blocks_by_range and beacon_blocks_by_root too much

Describe the solution you'd like

  • Per peer: Allow up to x requests per period
  • Per peer: Allow up to x blocks per period
  • Across peers: Allow up to x requests per period
  • Across peers: Allow up to x blocks per period

Reference params from Teku:

  • Per peer: up to 50 requests per 1 minute
  • Per peer: up to 500 blocks per 1 minute
@twoeths twoeths self-assigned this Nov 22, 2021
@dapplion
Copy link
Contributor

@tuyennhv Should the rate limiting apply only to block requests or any reqresp request?

@twoeths
Copy link
Contributor Author

twoeths commented Nov 23, 2021

@tuyennhv Should the rate limiting apply only to block requests or any reqresp request?

oh initially I thought it's for block requests only as it caused the performance issue to us but looks like other client apply to other reqresp requests as well (with request count limit) so we should do the same thing @dapplion

@dapplion
Copy link
Contributor

dapplion commented Nov 23, 2021

@tuyennhv Should the rate limiting apply only to block requests or any reqresp request?

oh initially I thought it's for block requests only as it caused the performance issue to us but looks like other client apply to other reqresp requests as well (with request count limit) so we should do the same thing @dapplion

Yeah we should rate limit everything, we should generalize the rate limiter design to work for all requests

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 a pull request may close this issue.

2 participants