Resque vs Sidekiq?

RubyRuby on-Rails-3ResqueSidekiq

Ruby Problem Overview


I am currently using Resque for my background process but recently I heard a lot of huff-buff about sidekiq. Could anybody compare/differentiate?

In particular I would like to know is there a way to monitor programmatically whether a job is completed in sidekiq

Ruby Solutions


Solution 1 - Ruby

Resque:

Pros:

Cons

  • runs a process per worker (uses more memory);
  • does not retry jobs (out of the box, anyway).
Sidekiq:

Pros

  • runs thread per worker (uses much less memory);
  • less forking (works faster);
  • more options out of the box.

Cons

  • [huge] requires thread-safety of your code and all dependencies. If you run thread-unsafe code with threads, you're asking for trouble;
  • works on some rubies better than others (jruby is recommended, efficiency on MRI is decreased due to GVL (global VM lock)).

Solution 2 - Ruby

From the question:

> In particular I would like to know is there a way to monitor > programmatically whether a job is completed in sidekiq

Here's a solution for that:

  1. Sidekiq::Status gem
  2. Batch API (Sidekiq Pro) - usage

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionBhushan LodhaView Question on Stackoverflow
Solution 1 - RubySergio TulentsevView Answer on Stackoverflow
Solution 2 - RubyGurpartap SinghView Answer on Stackoverflow