Get Advice Icon

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

delayed_job
delayed_job

40
36
+ 1
6
Redis
Redis

14.7K
9.8K
+ 1
3.8K
Add tool

delayed_job vs Redis: What are the differences?

What is delayed_job? Database backed asynchronous priority queue -- Extracted from Shopify. 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 Redis? An in-memory database that persists on disk. Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

delayed_job belongs to "Background Processing" category of the tech stack, while Redis can be primarily classified under "In-Memory Databases".

"Easy to get started" is the top reason why over 2 developers like delayed_job, while over 842 developers mention "Performance" as the leading cause for choosing Redis.

delayedjob and Redis are both open source tools. It seems that Redis with 37.4K GitHub stars and 14.4K forks on GitHub has more adoption than delayedjob with 4.46K GitHub stars and 915 GitHub forks.

According to the StackShare community, Redis has a broader approval, being mentioned in 3261 company stacks & 1781 developers stacks; compared to delayed_job, which is listed in 8 company stacks and 5 developer stacks.

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 Redis?

Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
Get Advice Icon

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

Why do developers choose delayed_job?
Why do developers choose Redis?

Sign up to add, upvote and see more prosMake informed product decisions

    Be the first to leave a con
    What companies use delayed_job?
    What companies use Redis?

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

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

      Sign up to get full access to all the tool integrationsMake informed product decisions

      What are some alternatives to delayed_job and Redis?
      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.
      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.
      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.
      Kue
      Kue is a feature rich priority job queue for node.js backed by redis. A key feature of Kue is its clean user-interface for viewing and managing queued, active, failed, and completed jobs.
      See all alternatives
      Decisions about delayed_job and Redis
      Jerome Dalbert
      Jerome Dalbert
      Senior Backend Engineer at StackShare | 4 upvotes 24.9K views
      atGratify CommerceGratify Commerce
      Amazon SQS
      Amazon SQS
      Ruby
      Ruby
      Sidekiq
      Sidekiq
      AWS Elastic Beanstalk
      AWS Elastic Beanstalk
      Rails
      Rails
      delayed_job
      delayed_job
      #BackgroundProcessing

      delayed_job is a great Rails background job library for new projects, as it only uses what you already have: a relational database. We happily used it during the company鈥檚 first two years.

      But it started to falter as our web and database transactions significantly grew. Our app interacted with users via SMS texts sent inside background jobs. Because the delayed_job daemon ran every couple seconds, this meant that users often waited several long seconds before getting text replies, which was not acceptable. Moreover, job processing was done inside AWS Elastic Beanstalk web instances, which were already under stress and not meant to handle jobs.

      We needed a fast background job system that could process jobs in near real-time and integrate well with AWS. Sidekiq is a fast and popular Ruby background job library, but it does not leverage the Elastic Beanstalk worker architecture, and you have to maintain a Redis instance.

      We ended up choosing active-elastic-job, which seamlessly integrates with worker instances and Amazon SQS. SQS is a fast queue and you don鈥檛 need to worry about infrastructure or scaling, as AWS handles it for you.

      We noticed significant performance gains immediately after making the switch.

      #BackgroundProcessing

      See more
      Jerome Dalbert
      Jerome Dalbert
      Senior Backend Engineer at StackShare | 3 upvotes 10K views
      atStackShareStackShare
      Redis
      Redis
      delayed_job
      delayed_job
      Ruby
      Ruby
      Sidekiq
      Sidekiq

      We use Sidekiq to process millions of Ruby background jobs a day under normal loads. We sometimes process more than that when running one-off backfill tasks.

      With so many jobs, it wouldn't really make sense to use delayed_job, as it would put our main database under unnecessary load, which would make it a bottleneck with most DB queries serving jobs and not end users. I suppose you could create a separate DB just for jobs, but that can be a hassle. Sidekiq uses a separate Redis instance so you don't have this problem. And it is very performant!

      I also like that its free version comes "batteries included" with:

      • A web monitoring UI that provides some nice stats.
      • An API that can come in handy for one-off tasks, like changing the queue of certain already enqueued jobs.

      Sidekiq is a pleasure to use. All our engineers love it!

      See more
      Django
      Django
      Redis
      Redis

      I use Redis because, based on the case studies I have reviewed, it appears to be the most performant cache database for my Django projects. The ease of configuration and deployment is also a big plus.

      Using both higher level view caching as well as low-level QuerySet caching with Redis has allowed me to improve HTTP request times by an order of magnitude.

      See more
      Interest over time
      Reviews of delayed_job and Redis
      Review ofRedisRedis

      Redis is a good caching tool for a cluster, but our application had performance issues while using Aws Elasticache Redis since some page had 3000 cache hits per a page load and Redis just couldn't quickly process them all in once + latency and object deseialization time - page load took 8-9 seconds. We create a custom hybrid caching based on Redis and EhCache which worked great for our goals. Check it out on github, it's called HybriCache - https://github.com/batir-akhmerov/hybricache.

      How developers use delayed_job and Redis
      Avatar of Cloudcraft
      Cloudcraft uses RedisRedis

      Redis is used for storing all ephemeral (that's data you don't necessarily want to store permanently) user data, such as mapping of session IDs (stored in cookies) to current session variables at Cloudcraft.co. The many datastructures supported by Redis also makes it an excellent caching and realtime statistics layer. It doesn't hurt that the author, Antirez, is the nicest guy ever! These days, I would be really hard pressed to find any situation where I would pick something like Memcached over Redis.

      Avatar of Trello
      Trello uses RedisRedis

      Trello uses Redis for ephemeral data that needs to be shared between server processes but not persisted to disk. Things like the activity level of a session or a temporary OpenID key are stored in Redis, and the application is built to recover gracefully if any of these (or all of them) are lost. We run with allkeys-lru enabled and about five times as much space as its actual working set needs, so Redis automatically discards data that hasn鈥檛 been accessed lately, and reconstructs it when necessary.

      Avatar of Stack Exchange
      Stack Exchange uses RedisRedis

      The UI has message inbox that is sent a message when you get a new badge, receive a message, significant event, etc. Done using WebSockets and is powered by redis. Redis has 2 slaves, SQL has 2 replicas, tag engine has 3 nodes, elastic has 3 nodes - any other service has high availability as well (and exists in both data centers).

      Avatar of Brandon Adams
      Brandon Adams uses RedisRedis

      Redis makes certain operations very easy. When I need a high-availability store, I typically look elsewhere, but for rapid development with the ability to land on your feet in prod, Redis is great. The available data types make it easy to build non-trivial indexes that would require complex queries in postgres.

      Avatar of Kent Steiner
      Kent Steiner uses RedisRedis

      I use Redis for cacheing, data storage, mining and augmentation, proprietary distributed event system for disparate apps and services to talk to each other, and more. Redis has some very useful native data types for tracking, slicing and dicing information.

      How much does delayed_job cost?
      How much does Redis cost?
      Pricing unavailable
      Pricing unavailable
      News about delayed_job
      More news