Queries regarding RabbitMQ clustering with 2 nodes

479 views
Skip to first unread message

Dhamotharan

unread,
Nov 22, 2022, 3:27:00 AM11/22/22
to rabbitmq-users
Hi Team,

I need some info regarding RabbitMQ clustering concept.

1. My application will be having 2 or 3 nodes of RabbitMQ instance depends on usage. Can we use quorum queues with 2 nodes(I have read it cannot be used with 2nodes , minimum is 3 nodes). If we have cluster with 2nodes, what type of queue can be used?

2. Producers and consumers will be running from all nodes with single active consumer case. 

For this use case, what is the best practise. Your suggestion would be helpful for me to use this RabbitMQ cluster in my application.

Thanks in advance,
Dhamotharan.

Dhamotharan

unread,
Nov 22, 2022, 3:41:12 AM11/22/22
to rabbitmq-users
  • RabbitMQ version - 3.10
  • Erlang version - 24.3
  • Operating system running RabbitMQ, and version - Windows Server 2016
  • Are you using a cluster, and if so, how many nodes - Clustering with 2 nodes and had a federation policy for HA when one node goes down

Michal Kuratczyk

unread,
Nov 23, 2022, 3:09:27 AM11/23/22
to rabbitm...@googlegroups.com
Hi,

1. Do not use 2-node clusters.
2. Do not use mirrored queues
3. Do not autoscale RabbitMQ clusters based on traffic (it might be possible, but it's certainly not trivial)
4. If you want replicated queues, use quorum queues (or streams)

Best,

--
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/ce6f7b83-b85f-4631-a5dc-e2b3ed5a4608n%40googlegroups.com.


--
Michał
RabbitMQ team

Dhamotharan

unread,
Nov 28, 2022, 5:03:07 AM11/28/22
to rabbitmq-users
Hi,

In my use the number of nodes can be vary. Can you please respond below query.

1. If we need to cluster 2 nodes, then what is the possible way?
2. If I use quorum queues with even number of nodes (say 4), then tolerated node failure will be 1 that means, if one master node goes to another node will become master but what if that another master node also becomes down?
3. Why I should not use classic queue with mirroring policy?

Thanks,
Dhamotharan

Michal Kuratczyk

unread,
Nov 28, 2022, 5:10:32 AM11/28/22
to rabbitm...@googlegroups.com
Mirroring policies will be removed from RabbitMQ next year. If you decide to use them, you will need to migrate off of them soon.
They are being removed because they have some fundamental flaws that can't be fixed.

Quorum queues are a replacement that solves the aforementioned issues. Using the RAFT consensus algorithm is a key part of the solution.
RAFT requires an odd number of nodes. That's not specific to RabbitMQ - you will see the same requirement in other RAFT-based software, for example:

Do not use 2 node clusters.

Best,



--
Michał
RabbitMQ team
Reply all
Reply to author
Forward
0 new messages