[rabbitmq-discuss] Using a VIP address for Clients Connecting to 3.1.0

Simon MacMullen simon at rabbitmq.com
Fri May 10 11:31:39 BST 2013


On 09/05/13 23:55, Johnny Costello wrote:
> Hi I am setting up a Rabbit MQ installation for HA. I am using
> clustering  and  active/active mirroring for HA.
>
> My Current Setup is two nodes that are set to mirror each other. I want
> to use a VIP address for my clients to connect to.
>
> I am not clear on how to configure the VIP. To me it appears that prior
> to Active/Active setup you always had to point your clients to the
> Master and then fail over to the slave if the Master fails.

For active/passive mirroring a la http://www.rabbitmq.com/pacemaker.html 
this is true.

> With Active/Active mirroring does this still apply or does it matter
> anymore?

Not really.

> Is there any command that can tell what server is the master anymore? I
> run cluster_status and nothing shows up saying which node is master.

No server is the master in a cluster.

Each individual mirrored queue has a master, but there's no reason to 
believe all the queues will end up with their master on the same node. 
You can determine a queue's master node by looking at something like 
"rabbitmqctl list_queues name pid" or "rabbitmqadmin list queues name node".

But you don't need to have your producers and consumers connect to the 
queue master; the cluster will forward messages internally. You will cut 
down a bit on intra-cluster network traffic though if you connect to the 
master.

> Is there a way to set up your configuration to always mirror queues
> instead of making the change on command line?

You have to use the command line or web UI. But it only needs to be done 
once:

$ rabbitmqctl set_policy ha-all ".*" '{"ha-mode":"all"}'

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, Pivotal


More information about the rabbitmq-discuss mailing list