How to implement a rate limiter/throttler? #2014
Unanswered
NikolaGrgic
asked this question in
Questions
Replies: 3 comments 3 replies
-
I think the best way to do this is with your load balancer/ proxy (i.e nginx/ apache). Im not sure if Rocket can get the IP of a request coming through anyway. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Maybe you could lock a Mutex at the start of the route function and drop it after a specified time in another thread. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Like this... If you try it out, give a report how it works for you ;-) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey all,
I was working on a web API and wanted to know: how would I go about creating a guard to limit the rate at which a particular route can be called?
Beta Was this translation helpful? Give feedback.
All reactions