[rabbitmq-discuss] Randomized Round-Robin?

Emile Joubert emile at rabbitmq.com
Thu Mar 28 15:44:46 GMT 2013

Hi Martin,

On 27/03/13 13:26, Martin Koch wrote:
> I have a setup with many workers on several hosts; each worker consumes
> tasks from a work queue. 

> What I would like to achieve is that a random worker is chosen instead
> of the deterministic round-robin.
It is not clear what this achieves - why does it matter if consumers are
initially selected in the same order that they joined?

If the number workers per host exceeds the capacity of the host to
perform work in parallel, and work arrives very slowly, and workers are
selected in sequence then you may see suboptimal throughput. The
solution then is to reduce the number of workers per host. The number of
consumers per host should not exceed the capacity of the host to perform
tasks in parallel. This is often approximated by the number of cores.


More information about the rabbitmq-discuss mailing list