[rabbitmq-discuss] rabbitmq-ha-test setup

Matthew Sackman matthew at rabbitmq.com
Fri Jul 29 14:47:17 BST 2011

On Fri, Jul 29, 2011 at 09:25:55AM -0400, Mark Steele wrote:
> Out of curiosity, does the master election occur on a per queue basis or is
> it cluster-wide?

Per queue. And it's not really master election. It's simply a list which
is appended to when new slaves join and removed from as people die. It's
done in such a way as to ensure that when the master dies, the new
master is the most likely to have been in the same state as the old

> Mirrored queues are great, however there is still the thorny issue of being
> limited to the throughput of the master when you've got one queue that has
> lots of messages in it.
> If the election process operates on a per queue basis, then it would be
> possible to declare multiple queues to the same exchange and effectively get
> load balanced usage of the cluster with all the goodness of high
> availability.

Slaves have to do almost as much work as the master, and there's much
greater communication overhead. Thus even though the design is async and
has been substantially tuned, you will find mirrored queues perform less
well than non-mirrored queues. At the end of the day, you just have to
do quite a lot more work and that'll take more time.


More information about the rabbitmq-discuss mailing list