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

Que

16
20
+ 1
0
Sidekiq

1.1K
631
+ 1
408
Add tool

Que vs Sidekiq: What are the differences?

Introduction

In this Markdown code, we will outline the key differences between Que and Sidekiq, two popular background job processing libraries for Ruby.

  1. Concurrency Model: Que uses a threaded concurrency model, where each job is processed within its own thread. This allows for parallel execution of jobs, minimizing overall processing time. On the other hand, Sidekiq uses a multi-process concurrency model, where multiple worker processes can be spun up to handle jobs concurrently. This approach allows for scalability by utilizing multiple CPU cores effectively.

  2. Job Prioritization: Que has built-in support for job prioritization, allowing developers to specify the urgency of each job. Que assigns a priority value to each job, and the worker then processes jobs in priority order. In contrast, Sidekiq does not have native support for job prioritization. However, developers can use various plugins or custom implementation to achieve prioritization functionality with Sidekiq.

  3. Dependency Requirements: Que has minimal dependencies and is designed to work with PostgreSQL as its primary data store. It leverages PostgreSQL's advanced features like advisory locks and MVCC to provide robust job queueing and execution. Sidekiq, on the other hand, requires Redis as a dependency to store job data and use it as a messaging backend. This dependency on Redis provides high-speed job processing and distributed work across multiple processes or machines.

  4. Concurrency Limit: In Que, the number of concurrent threads that can execute jobs is determined by the database connection pool. By adjusting the connection pool size, developers can control the concurrency limit. Sidekiq, on the contrary, allows setting a fixed number of worker processes to achieve concurrency control. This approach provides flexibility in managing resource utilization and balancing the load.

  5. Retry Mechanism: Sidekiq has a comprehensive retry mechanism built-in, where failed jobs can be automatically retried based on configurable rules, such as exponential backoff. Developers can specify the maximum number of retries or even implement custom retry logic. In comparison, Que does not have native support for automatic retries. However, developers can implement their own retry mechanism by monitoring the job status and re-enqueuing failed jobs manually.

  6. Monitoring and Dashboard: Sidekiq provides a web-based dashboard to monitor jobs, queues, and worker processes in real-time. This dashboard offers insights into job status, failures, and performance metrics. Que, on the other hand, does not provide a built-in dashboard. However, developers can use various third-party libraries or build custom monitoring solutions based on Que's provided APIs.

In summary, Que and Sidekiq differ in their concurrency model, job prioritization capabilities, dependency requirements, concurrency limit control, retry mechanism availability, and built-in monitoring/dashboard features.

Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of Que
Pros of Sidekiq
    Be the first to leave a pro
    • 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

    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 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 Sidekiq?
    Manage your open source components, licenses, and vulnerabilities
    Learn More

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

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

    Blog Posts

    Jun 6 2019 at 5:11PM

    AppSignal

    RedisRubyKafka+9
    15
    1712
    GitHubMySQLSlack+44
    109
    50790
    What are some alternatives to Que and Sidekiq?
    MySQL
    The MySQL software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software.
    PostgreSQL
    PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions.
    MongoDB
    MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding.
    Redis
    Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams.
    Amazon S3
    Amazon Simple Storage Service provides a fully redundant data storage infrastructure for storing and retrieving any amount of data, at any time, from anywhere on the web
    See all alternatives