Hello folks!
First of all I wanted to seize the chance to thanks the team & community behind RabbitMQ: I think it's a truly impressive piece of software.
Now let's get to the meat of my question:
At work I have a cluster doing video transcoding, with different Rabbit queues tailored to job sizes (e.g. 1 queue for vids < 25mb, 1 queue for vids > 25 && < 150mb, etc).
We rely on Amazon's Auto Scaling Group (ASG) feature to handle scaling of the cluster according to the CPU utilisation on each machine.
In order to avoid loading each machine of my cluster beyond a capacity it can handle, I have empirically derived certain prefetch counts to assign to each of my
queues; example: a machine cannot take simultaneously more than 2 jobs > 500MB.
Of course my aim would be to maximise the CPU as well the overall utilisation of each machine in a way the money we are paying to Amazon would be well spent.
This is notoriously difficult to do and it's an open research area:
What I'm asking is somewhat orthogonal: pretend I have a super algorithm which can reply to the questions "Can this machine accept more load?" and "Is this machine bearing too much load"? What I would like to do is to tweak the prefetch counts accordingly - and when the system is running! - to let the system reach an optimum. We are of course talking about "local"
ones and not "global" ones (aka shared for all consumers).
My questions for you folks:
1. Despite in the docs in not explicitly mentioned, is it possible to vary dynamically the prefetch count of a queue? Do you think this is a good idea at all?
- If yes, will Rabbit enforce its consistency properties to make sure no jobs will get lost during the "shrinking"/"expansion"?
- If no, do you guys have experience in this area and can give me pointers on how I could solve my problems in an alternative way?
Thanks a lot!
Alfredo