-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
App: Limit rate of requests to http queue #18981
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, we can probably even lower the frequency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
@lantiga reduced the default requests per second to 0.5, so in total we will now be looking at ~1 request per second - we can try with this for a bit and then maybe reduce further if all looks good 😃 |
(cherry picked from commit 9085db4)
(cherry picked from commit 9085db4)
What does this PR do?
Wraps the HTTPQueue with a RateLimitedQueue object that limits the number of requests to the inner queue (blocking the request until it is allowed). The target number of requests per second is configured with an env variable.
Before: ~10 requests per second
Now: 2-3 requests per second
Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:
Reviewer checklist
📚 Documentation preview 📚: https://pytorch-lightning--18981.org.readthedocs.build/en/18981/
cc @Borda