-
Notifications
You must be signed in to change notification settings - Fork 12
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 limiter #8
Comments
Rate limiting means paying in memory usage to prevent putting too much pressure on underlying services, and/or to ensure that some few users misbehaving does not prevent other well-behaved users from accessing the service. In case some dunder endpoints are more expensive for the backend to process, it might make sense to handle limiting per each endpoint. But that also means higher memory usage. Use the smallest acceptable timeWindow to minimize memory usage. If multiple external IPs are sending too many requests, it will typically be necessary to do rate-limiting on a dedicated machine. |
@sesam Thanks for your comments on this one. Yes the rationale was to prevent DoS-attacks. Although this defense is of course pretty weak, and should be addressed at higher levels such as the ISP, it's at least something. As
Register is probably a lot more expensive than the rest, but I would suggest to just Rate-limit everything. |
https://github.com/fastify/fastify-rate-limit
The text was updated successfully, but these errors were encountered: