What are the advantages of using redis in rails sidekiq?

Asked 1 years ago, Updated 1 years ago, 92 views

I'm a sidekiq beginner.

I use sidekiq of rails in combination with redis, but why redis?
redis recognizes that it is a KVS that runs on memory.
Do I have to use KVS to manage my job?

It would be easier to read jobs from ActiveRecord if you could manage them through MySQL...

ruby-on-rails redis sidekiq architecture

2022-09-30 21:16

1 Answers

This is because it needs to be accelerated.

Sidekiq and other so-called job queue managers are designed to handle large numbers of jobs, and the speed is very important to the number of jobs handled per second.Also, for job management reasons, it is a frequent perpetuation (write to =redis) of the state of the job.

RDBMS such as MySQL are not suitable for such frequent read & update operations.They simply don't want performance.Therefore, we use KVS such as redis for faster speeds.


2022-09-30 21:16

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.