Convox Community

Autoscaling Sidekiq Workers

Hi,

Was wondering if anyone has had success autoscaling Sidekiq worker instances based on queue depth? If so I’d love to hear about your experiences.

Looking at the Convox docs I’d assume that I’d need to use something like this gem to publish my queue metrics to CloudWatch and then setup the autoscaling targets in my convox.yml?

1 Like

To answer my own question, yes, thats how you do it!

Adding the gem to my app got all the metrics feeding direct into CloudWatch, and right now I’m doing simple scaling based on queue depth, appears to be working well:

scale:
  count: 1-10
  targets:
    custom:
      Sidekiq/EnqueuedJobs:
        aggregate: max
        value: 500
2 Likes

Hi Chris, thanks for sharing this, that’s awesome! I was just scaling my Sidekiq workers based on CPU usage, but this is a much better approach, so I’ll set this up as well. Thanks!

:raised_hands: this is exactly what I was looking for, thank you!