0

I have set of tasks and each of them requires some certain condition to be satisfied. For example task needs 100 Mb of RAM to be executed. Also I have multiple servers where workers are placed. Each worker has some configuration that describes how many resources it has. For example some worker is available to use 1 Gb of RAM for execution of task.
Is there any system for distribution tasks between workers so that each worker satisfies requirements of task passed to it? Or maybe I can somehow do it with message broker (RabbitMQ for example)?
I am aware writing my own application for this because I don't want to reinvent the wheel.
Workers are written in Go.

Nikita Lapkov
  • 121
  • 1
  • 6

1 Answers1

0

RabbitMQ doesn't explicitly know such things about it's clients. It knows how many clients are there, how many subscribers to the queue etc.

You could however set up the exchanges in the way that would distribute the tasks as desired. However, you would have to know before the publishing of the task to which (type of) subscriber should it go to.

cantSleepNow
  • 9,691
  • 5
  • 31
  • 42