0

I have a clustered HA rabbitmq setup. I am using the "exactly" policy similar to:

rabbitmqctl set_policy ha-two "^two\." \'{"ha-mode":"exactly","ha-params":10,"ha-sync-mode":"automatic"}'

I have 30 machines running, of which 10 are HA nodes with queues replicated. When my broker goes down (randomly assigned to be the first HA node), I need my celery workers to point to a new HA node (one of the 9 left). I have a script that automates this. The problem is: I do not know how to distinguish between a regular cluster node and a HA node. When I issue the command:

rabbitmqctl cluster_status

The categories I get are "running nodes", "disc", and "ram". but there is no way here to tell if a node is HA.

Any ideas?

jeffrey
  • 3,196
  • 7
  • 26
  • 44

1 Answers1

0

In cluster every node share everything with another, so you don't have do distinguish nodes in your application in order to access all entities.

In your case when one of HA node goes down (their number get to 9), HA queues will be replicated to first available node (doesn't matter disc or ram).

pinepain
  • 12,453
  • 3
  • 60
  • 65
  • Yes but my non-HA nodes in the cluster do not have replicated queues. Are you saying that even if that is the case, my non-HA nodes can act as brokers? – jeffrey Oct 15 '14 at 15:58
  • I don't think so as my celery workers will not be able to access the queue, as a non-HA cluster node does not actual have a copy of the queue – jeffrey Oct 15 '14 at 16:09
  • What do you mean under "HA nodes"? HA set on queue, in you case queue should be replicated on exactly 10 nodes. So you have to lose at the same time all 10 nodes where queue reside to get in trouble. – pinepain Oct 15 '14 at 17:36