Scaling in Rabbitmq

Lalit Singh Rana picture Lalit Singh Rana · May 25, 2015 · Viewed 8.9k times · Source

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?

Answer

old_sound picture old_sound · Jun 8, 2015

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