A
A
aikus2015-06-17 11:54:05
RabbitMQ
aikus, 2015-06-17 11:54:05

A queue server that can independently raise workers as needed?

We have a service with a large number of clients (accounts), for each user I want to create their own task queue so that they do not delay each other.
A large number of "workers" for rabbitMQ and / or docker is not a hunt, because it is not clear because

  1. It is not clear how to delay their death
  2. They will eat up a lot of RAM with so many clients
  3. 99% of the time they are not needed, because. the queue for most will be empty

Ohto, so that the server either performs the assigned tasks itself, or raises the worker only when there is a task for it, and extinguishes it after the work is completed. Well, it goes without saying that I didn’t start the task from the queue until the next one worked.
Does anyone know a ready-made solution for such a task?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Shandrinov, 2015-06-17
@suguby

Why for everyone? If one worker worked for one client, then let him process the next one :) Extinguishing / raising is also a resource-eating task.
celery has auto-balancing the number of workers - docs.celeryproject.org/en/latest/userguide/workers... you can specify how many to keep in memory just in case and how many additional ones can be raised if necessary.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question