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

www: improve API rate limit #130

Closed
peterthomassen opened this issue Jan 22, 2019 · 3 comments
Closed

www: improve API rate limit #130

peterthomassen opened this issue Jan 22, 2019 · 3 comments

Comments

@peterthomassen
Copy link
Member

The API rate limit is currently set at 30r/s which seems a bit high for requests forwarded to pdns; for tests concerning account management (creation, login etc.) is it fine. The high rate that is currently allowed is required for the test suite to run properly.

The rate limit needs to be adjusted such that requests passed to pdns are constrained more tightly. This concerns requests under /api/v1/domains/ in particular, maybe even independent of IP address. Further load testing on pdns has to be done.

We might want to define exceptions for automated tests, i.e. origin IP ranges local to the docker installation. One possible solution is described here.

peterthomassen added a commit that referenced this issue Jan 22, 2019
The API rate limit is rather high to allow the test suite to run.
Technical debt is tracked in #130.
@peterthomassen
Copy link
Member Author

This appears quite handy: https://django-ratelimit.readthedocs.io/en/stable/

peterthomassen added a commit that referenced this issue Jan 23, 2019
The API rate limit is rather high to allow the test suite to run.
Technical debt is tracked in #130.
@My1
Copy link

My1 commented Feb 16, 2019

the intresting question will obviously be how many are allowed after the real fix (and I probably should check my hobby webinterface for whether or not it uses multiple calls on one site), but generally I doubt that more than 2 or 3 per sec would be needed in non-automated scenarios

@peterthomassen
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants