Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scaling in Rabbitmq

While using Clusters in Rabbit MQ, I was planning to use the Competing Subscriber pattern.

Producer : 1
Exchange : 1 direct
Queue : 1
Consumers : n (multiple) listening to the same queue.

Now if I have a cluster containing 3 nodes, there would be but one queue from where the consumer gets the message (irrespective of number of nodes in cluster). If I have to scale up with the above constraints, do you think I should be having multiple clusters.

Please advise.

Second related question, how clustering would help in scalablity?

like image 888
Lalit Singh Rana Avatar asked Dec 25 '22 19:12

Lalit Singh Rana


1 Answers

Clustering is not there to improve Scalability (although it might help in some situations) but to improve High Availability.

For Scalability see the Sharding Plugin which can be used together with clustering https://github.com/rabbitmq/rabbitmq-sharding

Note that you need to find out if said plugin meets your requirements, the README tells of the limitations of the plugin

like image 161
old_sound Avatar answered Jan 27 '23 16:01

old_sound