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

An ability to add multiple limits for the same host #1

Open
andrusha opened this issue Feb 2, 2013 · 4 comments
Open

An ability to add multiple limits for the same host #1

andrusha opened this issue Feb 2, 2013 · 4 comments

Comments

@andrusha
Copy link

andrusha commented Feb 2, 2013

It's a great gem, but one ability it's missing is to add multiple limits for the same host. For example vk.com restricts you to make 3 requests per second and to 30 requests per minute simultaneously.

@benbjohnson
Copy link
Owner

@andrusha I haven't updated SlowWeb in quite a while. If you want to send a pull request with tests then I'll merge it and release a new version.

@jumski
Copy link

jumski commented Feb 11, 2013

@andrusha do you plan to write it?
Have same issues.

@andrusha
Copy link
Author

@jumski since my limits were for a big time frame (1 minute, 1 hour) I solved it in another way - I use sidekiq to make requests until api throws an error and then re-schedule the same job after 1 minute or 1 hour to continue with job.

@jumski
Copy link

jumski commented Feb 11, 2013

Similar situation to mine - throwing requests from sidekiq jobs.
But I have lot of various workers, and all of them need to obey the limit.
Dunno if it's even possible to safely share counter between threads using slowweb.

I think will go with redis and custom solution.

Thanks :)

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

3 participants