Reputation: 2939
We have a cluster with 3 nodes, we currently have the following HA (High Availability) mirror policy as shown below:
Upvotes: 1
Views: 7775
Reputation: 59
With ha-mode as exactly and ha-params as 2, mirroring/replication will be enabled across 2 nodes in the cluster (including the leader). If a new node is added in this case, replication will continue to happen only on 2 nodes.
On the other hand, with ha-mode as all, mirroring/replication will be enabled across all the nodes in the cluster. Here, if a new node is added to the cluster, replication will also start happening on the new node.
You can read more about Classic Mirrored Queues here - https://www.rabbitmq.com/docs/3.13/ha#mirroring-arguments
Moreover, Classic Mirrored Queues have been deprecated in the latest version of RabbitMQ. A modern approach is to use Quorum Queues - https://www.rabbitmq.com/docs/quorum-queues
Upvotes: 0
Reputation: 321
A count value of 2 means 2 replicas: 1 queue leader and 1 queue mirror. In other words: NumberOfQueueMirrors = NumberOfNodes - 1
.
to dig more details: https://www.rabbitmq.com/ha.html#mirroring-arguments
Upvotes: 3
Reputation: 2939
Delving deeper and with a bit more understanding I can see that specifying ha-params as 2 will mean that a total of 2 nodes will be mirrored, so one of the nodes wont be! It's no the same as the all one, as that would mirror to all nodes, which would make more sense to me currently.
Upvotes: 1