[rabbitmq-discuss] Correct way of determining which node is master?

Matt Pietrek mpietrek at skytap.com
Tue Feb 21 19:04:16 GMT 2012

In a clustered scenario (3 brokers) with mirrored queues, what is the
correct way to determine which node is the "master" via inspection?

On approach would be to look at the list of queues and see which node is
hosting the queue (as opposed to slave_nodes). However, I'm unsure if
there's some scenario where queue 'A' is hosted by one broker, while queue
'B' is hosted by another.

Another approach is to go off of whichever node has the statistics database,
but I'm unsure if there's a 1:1 correlation there.

If I were to use some combination of rabbitmqctl or rabbitmqadmin commands,
what heuristic should I use?

Background info, in case it matters:

We're using keepalived to maintain a virtual IP that all clients connect to.
We'd obviously like keepalived to put the VIP on whatever node is the master
rather than on a slave node. Our understanding is that if the master has
messages that aren't in the slave node, a client that connects via the VIP
to the slave node and tries to read messages won't see them as they're only
on the master.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120221/d2ce196b/attachment.htm>

More information about the rabbitmq-discuss mailing list