-
Notifications
You must be signed in to change notification settings - Fork 957
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
feat(relay): allow to configure default rate limiters #5584
feat(relay): allow to configure default rate limiters #5584
Conversation
I believe it was discussed previously that it was made private to allow others to implement their own |
Yes I do think it is a good idea to allow people implementing their own Currently we did not had a use case were we needed to implement our own rate limiter, we are perfectly happy with the generic ones that are provided in the libp2p. However, we wanted to update the default configurations of the default rate limiters. We don't have many relay peers for now on our network and we were reaching the default rate limiters too fast. We just needed to set a different |
Correct, however unless I am missing something, would setting
In that case, wouldnt you be able to update the default from the functions above?
Just for clarification, you want to be able to set different rate limits for different peers and not the ones set in the config, which would apply for every peer? |
Oh yes indeed !! My bad. We did not see those function back then. You are totally right this PR has the same purpose than those functions, so no need for this PR 😉
Hum I'm not sure what you mean. What we needed to do was to increase the rate limiters of the relay Thanks a lot for you patience and explanations. I'm closing this since your functions should perfectly do the job for us 😊 |
Description
Making the
GenericRateLimiterConfig
,rate_limiter::new_per_peer
andrate_limiter::new_per_ip
public to be able to configure the default rate limiters and still use them.Notes & open questions
Change checklist