enova / sidekiq-rate-limiter

Redis-backed, per-worker rate limits for job processing.
http://rubygems.org/gems/sidekiq-rate-limiter
MIT License
192 stars 43 forks source link

Rate limiting per worker? #14

Open heldopslippers opened 8 years ago

heldopslippers commented 8 years ago

Hi Guys,

We currently use Sidekiq-rate-limiter. We experiencing that when we use mulitple differen workers (same queue and name) they all have their own limit.

So for example: I start 50 times FirstWorker (limit 1 per second). And start 50 time SecondWorker (limit 1 per second).

It will actually do 2 jobs per second. Has anybody else have a solution for this?

bobber205 commented 8 years ago

no way you can use the same queue/name of worker for different workers.

JIucToyxuu commented 7 years ago

How we see from README - this gem should support options from https://github.com/gevans/sidekiq-throttler gem. README sidekiq-throttler gem contain paragraph 'Custom Keys'. So, maybe this can be used as solution for this issue? Or :key option is not supported?

P.S. instead of :key should be use :name option.