Hung Le
Hung Le

Reputation: 189

Redis Queue is using multithreading or multiprocessing?

I found that Redis Queue is a good broker to start the a new task for processing. However, I don't know whether Redis Queue is using Multithreading or Multiprocessing in Python?.

The original repo is here: https://github.com/rq/rq

"RQ (Redis Queue) is a simple Python library for queueing jobs and processing them in the background with workers"

Furthermore, what is the meaning of workers here? Is it processors (CPU cores) in the computer?

Thank you guys

Upvotes: 0

Views: 1897

Answers (1)

Jacky Wang
Jacky Wang

Reputation: 3490

Redis Queue is indeed a distributed task queue, which similar to Celery. The task/job is typically distributed across machines (on which deploy worker). It differs from the regular multi-process or thread which using multiprocessing standard library.

The worker is a process which consume the task/job from Redis (which acting as a message queue here, like RabbitMQ, Kafka), and then process the task, and send back the result.

Upvotes: 2

Related Questions