-
Notifications
You must be signed in to change notification settings - Fork 117
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
How to rate limit API calls? #18
Comments
I have thought about this for my own API, too. Currently there is no feature in Restivus to assist with making this DRY. You would have to place some sort of function in each of your manually overridden endpoints. Terrible. The only planned feature I have now that would help with this is the hooks that run before each endpoint is executed. You would still have to write the function yourself to make the rate limit check, but at least you would only have to add it once for all endpoints. This is actually a super simple feature to add that will greatly improve the flexibility of Restivus, so this feature will become the top priority, as soon as I add a few more tests. I've moved it to the top of the roadmap. I will keep you posted on any progress here. |
Normally i would advise to rate limit with Nginx and HAprox to catch some DOS attakcs/abuses. |
That's a great suggestion @xanatas! I was unaware that this could be done at the nginx level. Here's a good article on it: https://lincolnloop.com/blog/rate-limiting-nginx/. Seems like a very effective method for rate limiting. Thank you so much for passing that information along! |
Is there a way to rate limit API calls? I couldn't find a build-in method, so how would you suggest to solve this?
The text was updated successfully, but these errors were encountered: