Need advice about which tool to choose?Ask the StackShare community!

delayed_job

51
64
+ 1
6
Sidekiq

1.1K
629
+ 1
408
Add tool

Sidekiq vs delayed_job: What are the differences?

Comparing Sidekiq and delayed_job

Both Sidekiq and delayed_job are popular background job processing libraries used in Ruby on Rails applications. While they have similarities in terms of being used for asynchronous job processing, there are several key differences between the two.

  1. Concurrency model: Sidekiq uses a multithreading approach to handle multiple jobs concurrently, which makes it more efficient and faster in processing jobs. On the other hand, delayed_job relies on a single worker process and is not as efficient in handling concurrent jobs.

  2. Job persistence: Sidekiq stores job data in Redis, a high-performance in-memory data store. It allows for job retriavel, prioritization, and rescheduling. delayed_job, however, stores job data in the application's database, which can impact performance and scalability.

  3. Error handling: Sidekiq provides a more robust error handling mechanism by allowing developers to define custom retry and error handling strategies. delayed_job has a simpler error handling mechanism that retries a failed job a fixed number of times before giving up.

  4. Middleware support: Sidekiq supports middleware functionality, which allows developers to inject custom logic before and after job execution. delayed_job does not have built-in middleware support, limiting the extensibility and customization options.

  5. Scalability: Sidekiq's multithreaded architecture makes it highly scalable, allowing it to handle a large number of concurrent jobs effectively. delayed_job, on the other hand, can struggle with scalability due to its single worker process approach.

  6. Community support and active development: Sidekiq has a larger and more active community compared to delayedjob. It has regular updates, bug fixes, and improvements, which ensures ongoing development and support. delayedjob, while still widely used, has a smaller community and fewer updates.

In summary, Sidekiq offers benefits like efficient concurrency model, job persistence in Redis, robust error handling, middleware support, scalability, and active community development. delayed_job, on the other hand, relies on a simpler single worker process model with database job storage.

Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of delayed_job
Pros of Sidekiq
  • 3
    Easy to get started
  • 2
    Reliable
  • 1
    Doesn't require Redis
  • 124
    Simple
  • 99
    Efficient background processing
  • 60
    Scalability
  • 37
    Better then resque
  • 26
    Great documentation
  • 15
    Admin tool
  • 14
    Great community
  • 8
    Integrates with redis automatically, with zero config
  • 7
    Stupidly simple to integrate and run on Rails/Heroku
  • 7
    Great support
  • 3
    Ruby
  • 3
    Freeium
  • 2
    Pro version
  • 1
    Dashboard w/live polling
  • 1
    Great ecosystem of addons
  • 1
    Fast

Sign up to add or upvote prosMake informed product decisions

- No public GitHub repository available -

What is delayed_job?

Delayed_job (or DJ) encapsulates the common pattern of asynchronously executing longer tasks in the background. It is a direct extraction from Shopify where the job table is responsible for a multitude of core tasks.

What is Sidekiq?

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 3/4 to make background processing dead simple.

Need advice about which tool to choose?Ask the StackShare community!

What companies use delayed_job?
What companies use Sidekiq?
See which teams inside your own company are using delayed_job or Sidekiq.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with delayed_job?
What tools integrate with Sidekiq?
    No integrations found

    Blog Posts

    Jun 6 2019 at 5:11PM

    AppSignal

    RedisRubyKafka+9
    15
    1644
    GitHubMySQLSlack+44
    109
    50666
    What are some alternatives to delayed_job and Sidekiq?
    RabbitMQ
    RabbitMQ gives your applications a common platform to send and receive messages, and your messages a safe place to live until received.
    Resque
    Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both.
    Hangfire
    It is an open-source framework that helps you to create, process and manage your background jobs, i.e. operations you don't want to put in your request processing pipeline. It supports all kind of background tasks – short-running and long-running, CPU intensive and I/O intensive, one shot and recurrent.
    Cron
    Background-only application which launches and runs other applications, or opens documents, at specified dates and times.
    PHP-FPM
    It is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites. It includes Adaptive process spawning, Advanced process management with graceful stop/start, Emergency restart in case of accidental opcode cache destruction etc.
    See all alternatives