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

Working across multiple resque servers? #4

Open
blakewest opened this issue May 24, 2017 · 1 comment
Open

Working across multiple resque servers? #4

blakewest opened this issue May 24, 2017 · 1 comment

Comments

@blakewest
Copy link

blakewest commented May 24, 2017

Hi, thanks for making this library! I'm using it at work, and we are trying to throttle a bunch of nightly calls we make to an API. Their limit is 10 requests / second. Currently we run 3 resque servers, with with several workers. We've created a special queue just for this API, and throw all of our jobs related to the API onto this queue. So our resque config looks like this:
Resque.rate_limit(:special_api_queue, at: 2, per: 1)

And yet, we still are getting rate limit errors. From the ReadMe, I would think this means a limit of 2 per second. Which, even if the limit was per server (which is certainly unexpected behavior), should be 6 / second.
So my question here is just understanding how this queue limit plays across multiple resqueue worker threads and servers.
What I'd love is a way to set the rate limit from that queue across all servers/workers, so that I can rest assured that rate limits won't get hit, even if I scale up or down our number of servers/workers.

Thanks! - Blake

@malomalo
Copy link
Owner

Are you still seeing this issue? Sorry I'm no longer using Resque and didn't realize people are using this repo

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

No branches or pull requests

2 participants