Home

Awesome

Sidekiq

Gem Version Build

Simple, efficient background processing for Ruby.

Sidekiq uses threads to handle many jobs at the same time in the same process. It does not require Rails but will integrate tightly with Rails to make background processing dead simple.

Requirements

Sidekiq 8.0 supports Rails 7.0+ but does not require it.

Sidekiq supports Valkey and Dragonfly as Redis alternatives but Redis 7.2.4 is considered to be the canonical implementation. Incompatibilities with that version are considered bugs.

Installation

bundle add sidekiq

Getting Started

See the Getting Started wiki page and follow the simple setup process. You can watch this YouTube playlist to learn all about Sidekiq and see its features in action. Here's the Web UI:

Web UI

Performance

The benchmark in bin/sidekiqload creates 500,000 no-op jobs and drains them as fast as possible, assuming a fixed Redis network latency of 1ms. This requires a lot of Redis network I/O and JSON parsing. This benchmark is IO-bound so we increase the concurrency to 25. If your application is sending lots of emails or performing other network-intensive work, you could see a similar benefit but be careful not to saturate the CPU.

VersionTime to process 500k jobsThroughput (jobs/sec)RubyConcurrencyJob Type
Sidekiq 7.0.321.3 sec23,5003.2.0+yjit30Sidekiq::Job
Sidekiq 7.0.333.8 sec14,7003.2.0+yjit30ActiveJob 7.0.4
Sidekiq 7.0.323.5 sec21,3003.2.030Sidekiq::Job
Sidekiq 7.0.346.5 sec10,7003.2.030ActiveJob 7.0.4
Sidekiq 7.0.323.0 sec21,7002.7.530Sidekiq::Job
Sidekiq 7.0.346.5 sec10,8502.7.530ActiveJob 7.0.4

Most of Sidekiq's overhead is Redis network I/O. ActiveJob adds a notable amount of CPU overhead due to argument deserialization and callbacks. Concurrency of 30 was determined experimentally to maximize one CPU without saturating it.

Want to Upgrade?

Use bundle up sidekiq to upgrade Sidekiq and all its dependencies. Upgrade notes between each major version can be found in the docs/ directory.

I also sell Sidekiq Pro and Sidekiq Enterprise, extensions to Sidekiq which provide more features, a commercial-friendly license and allow you to support high quality open source development all at the same time. Please see the Sidekiq homepage for more detail.

Problems?

Please do not directly email any Sidekiq committers with questions or problems. A community is best served when discussions are held in public.

If you have a problem, please review the FAQ and Troubleshooting wiki pages. Searching the issues for your problem is also a good idea.

Sidekiq Pro and Sidekiq Enterprise customers get private email support. You can purchase at https://sidekiq.org; email support@contribsys.com for help.

Useful resources:

Every Thursday morning is Sidekiq office hour: I video chat and answer questions. See the Sidekiq support page for details.

Contributing

Please see the contributing guidelines.

License

Please see LICENSE.txt for licensing details. The license for Sidekiq Pro and Sidekiq Enterprise can be found in COMM-LICENSE.txt.

Author

Mike Perham, @getajobmike / @sidekiq, https://www.mikeperham.com / https://www.contribsys.com