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

Que

16
20
+ 1
0
Resque

118
125
+ 1
9
Sidekiq

1.1K
629
+ 1
408

Que vs Resque vs Sidekiq: What are the differences?

Introduction

In the world of web development, it is common to encounter scenarios where background jobs need to be executed asynchronously. This is where job queuing systems come into play, facilitating the scheduling and execution of tasks beyond the typical request-response cycle. Three popular options for job queuing in Ruby on Rails applications are Que, Resque, and Sidekiq. This article highlights the key differences between these three tools, outlining their unique features and functionalities.

  1. Scalability and Concurrency: While Que and Resque are based on a single-threaded model where a single worker processes jobs sequentially, Sidekiq stands out by utilizing multi-threading to concurrently perform jobs. The availability of multiple threads allows Sidekiq to achieve higher scalability and handle larger workloads more efficiently.

  2. Redis Dependency: Que is designed to work with PostgreSQL as its underlying storage and uses advisory locks to ensure data integrity. Resque, on the other hand, relies on Redis as a message broker and storage system. Sidekiq, similar to Resque, also leverages Redis as its backend to store job information and manage communication between workers.

  3. Active Job Compatibility: Que is built as an extension of Active Record, making it tightly integrated with Rails and its Active Job framework. It leverages familiar ActiveRecord patterns and allows developers to define job methods as plain Ruby objects within the application codebase. Resque, although not originally part of the Active Job ecosystem, has been retrofitted to support it. Sidekiq, being one of the earliest job queuing systems, introduced Active Job compatibility from the beginning, allowing seamless integration with any Rails application.

  4. Middleware Support: Sidekiq differentiates itself by providing an extensive middleware system that allows customization and interception of job execution. Middleware can be utilized to add additional functionality, modify job behavior, or even perform actions before and after job processing. Resque provides middleware support as well, but Que lacks this feature.

  5. User Interface and Monitoring: Sidekiq takes the lead when it comes to monitoring and introspection capabilities. It offers a web-based dashboard that provides real-time insights about the state of workers, jobs, and even allows retrying failed jobs. Resque also offers a web-based UI, albeit with fewer features, while Que does not have a dedicated user interface.

  6. Community and Ecosystem: Sidekiq has established a large and active community with comprehensive documentation, as well as numerous extensions and plugins contributed by the community. Resque has a smaller but still vibrant community, and Que, being a comparatively newer contender in the job queuing arena, has a relatively smaller ecosystem.

In summary, Que, Resque, and Sidekiq are all capable job queuing systems with their distinct features and approaches. Sidekiq's multi-threaded architecture, Active Job compatibility, middleware support, and comprehensive monitoring make it stand out as a popular choice for many developers. However, Resque and Que also offer simplicity, compatibility with Rails, and a solid foundation for handling background job processing in different scenarios.

Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Que
Pros of Resque
Pros of Sidekiq
    Be the first to leave a pro
    • 5
      Free
    • 3
      Scalable
    • 1
      Easy to use on heroku
    • 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 -
    - No public GitHub repository available -

    What is Que?

    Que is a high-performance alternative to DelayedJob or QueueClassic that improves the reliability of your application by protecting your jobs with the same ACID guarantees as the rest of your data.

    What is 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.

    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 Que?
    What companies use Resque?
    What companies use Sidekiq?

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

    What tools integrate with Que?
    What tools integrate with Resque?
    What tools integrate with Sidekiq?

    Blog Posts

    Jun 6 2019 at 5:11PM

    AppSignal

    RedisRubyKafka+9
    15
    1643
    GitHubMySQLSlack+44
    109
    50665
    What are some alternatives to Que, Resque, and Sidekiq?
    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.
    Beanstalkd
    Beanstalks's interface is generic, but was originally designed for reducing the latency of page views in high-volume web applications by running time-consuming tasks asynchronously.
    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.
    Cron
    Background-only application which launches and runs other applications, or opens documents, at specified dates and times.
    Bull
    The fastest, most reliable, Redis-based queue for Node. Carefully written for rock solid stability and atomicity.
    See all alternatives