"master node" in a cluster

661 views
Skip to first unread message

philip

unread,
Sep 26, 2019, 1:41:13 PM9/26/19
to rabbitmq-users
Have a couple questions about cluster.


What's a master node?  

Does it apply for a cluster that has a mix of disk node and ram node?  For example
- for a cluster of 3 nodes, 1 disk node and ram nodes, so will that make the disk node the master?  So, when doing a full stop upgrade, the disk node must be shutdown last and start up first?
- for a cluster of 3 nodes, 2 disk nodes and ram nodes, which one is the master?  Or there is no master, so when doing a full stop upgrade, one of the disk node must be shutdown last and start up first?
- for a cluster of 3 nodes, 3 disk nodes, which one is the master?  Or there is no master and for doing full stop upgrade, any nodes can be shutdown and start at any order?

Does it apply for a cluster with HA mirrored queue enabled where one of the node has all the master queues?   We have recently enabled HA mirrored queues and when we did a rolling upgrades, all master queues ended up in one node (the fist one start up).  What's the recommendation on this scenario to re-balance the queues if we are required to do rolling upgrades?


Thanks.







Diana Parra Corbacho

unread,
Sep 27, 2019, 7:41:15 AM9/27/19
to rabbitm...@googlegroups.com
There aren't master nodes in a RabbitMQ cluster, the term `master` only applies to the HA mirrored queues. Only if you are doing a full-stop upgrade the order between disk and ram nodes is relevant as explained in [1].

The documentation that you linked [2] explains how to rebalance mirror queues after a rolling upgrade. From 3.8, there are new `rabbitmq-queues rebalance` and `rabbitmq-upgrade post_upgrade` commands that will do the rebalance. The former can be used by operators at any other time that rebalance might be required.


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/9f44c90c-00b2-4f17-92ee-faa13f54dc89%40googlegroups.com.


--
Diana Corbacho

Pivotal / RabbitMQ

philip

unread,
Sep 27, 2019, 12:37:22 PM9/27/19
to rabbitmq-users
Thanks for the answer.

As I tried out the rebalance-queue-masters script, it doesn't seem to be working for when I have virtual host other than the root ("/").  And also what's your recommendations on when our cluster is running multiple vitual hosts?

Another question, while the script is running, can the cluster still be processing messages?

Thanks.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitm...@googlegroups.com.

Luke Bakken

unread,
Sep 27, 2019, 4:58:49 PM9/27/19
to rabbitmq-users
As I tried out the rebalance-queue-masters script, it doesn't seem to be working for when I have virtual host other than the root ("/").

Please share the exact command you're using to run the script. What is the output, or could you please better describe "doesn't seem to be working"?
 
Another question, while the script is running, can the cluster still be processing messages?

Yes, though there may be a performance impact. It's best to test in a staging environment using your expected workload first.

Thanks -
Luke 

philip

unread,
Oct 15, 2019, 10:22:12 AM10/15/19
to rabbitmq-users
Hi, sorry for the late response.  About running the rebalance-queue-masters script, I have set up two virtual hosts other than the root ("/") and intentionally created 10 queues per virtual hosts on one node in a cluster of three nodes.   

Something like:
virtual host    |    # of queues    |  queue masters distribution
/ (root)           |    100                 |  spread across 3 nodes
host1             |     10                  |   only in node 1
host2             |     10                  |   only in node 2

And here is the command "sudo bash /tmp/rebalance-queue-masters.sh". After this script is completed, only the queues in root host are balanced, and the queues in host1 and host2 remained the same. Perhaps I was missing some arguments to specify the host? Any documentation on command arguments would be greatly appreciated.

Thanks.

Luke Bakken

unread,
Oct 15, 2019, 1:14:08 PM10/15/19
to rabbitmq-users
Hi,

You can use the -h argument to get script usage:


The -p argument allows you to specify a different vhost.

Thanks,
Luke

philip

unread,
Oct 17, 2019, 1:21:31 PM10/17/19
to rabbitmq-users
Thanks.
Reply all
Reply to author
Forward
0 new messages