| Messages are *always* read from the master node (for a given queue).<br><br>This is very helpful. Going a step further, is it true to say that in a cluster where we mirror all queues, there's really no benefit to assigning the VIP to one node over another?<br>
<br>Matt<br><br><br><div class="gmail_quote">On Wed, Feb 22, 2012 at 1:58 AM, Simon MacMullen <span dir="ltr"><<a href="mailto:simon@rabbitmq.com">simon@rabbitmq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 21/02/12 19:04, Matt Pietrek wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In a clustered scenario (3 brokers) with mirrored queues, what is the<br>
correct way to determine which node is the "master" via inspection?<br>
</blockquote>
<br></div>
There isn't one. As in, there isn't really an overall master node.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On approach would be to look at the list of queues and see which node is<br>
hosting the queue (as opposed to slave_nodes). However, I'm unsure if<br>
there's some scenario where queue 'A' is hosted by one broker, while<br>
queue 'B' is hosted by another.<br>
</blockquote>
<br></div>
Absolutely. The original master node *for a given queue* is the one that the client that first declared the queue was connected to. But then they can fail over to other nodes pretty arbitrarily.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Another approach is to go off of whichever node has the statistics<br>
database, but I'm unsure if there's a 1:1 correlation there.<br>
</blockquote>
<br></div>
Again, this is the first node with mgmt to come up, or some other node at random in the case of failover.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Background info, in case it matters:<br>
<br>
We're using keepalived to maintain a virtual IP that all clients connect<br>
to. We'd obviously like keepalived to put the VIP on whatever node is<br>
the master rather than on a slave node. Our understanding is that if the<br>
master has messages that aren't in the slave node, a client that<br>
connects via the VIP to the slave node and tries to read messages won't<br>
see them as they're only on the master.<br>
</blockquote>
<br></div>
No, that's not correct. Messages are *always* read from the master node (for a given queue).<br>
<br>
Cheers, Simon<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Simon MacMullen<br>
RabbitMQ, VMware<br>
</font></span></blockquote></div><br>