[rabbitmq-discuss] RabbitMQ - can we make use policies as load balancing in cluster?

Michael Klishin mklishin at gopivotal.com
Wed Oct 23 14:50:56 BST 2013


On 23 Oct 2013, at 17:09, Rajasekhar P <sekhar434145 at gmail.com> wrote:

> I have one more question on clustering from RabbitMQ HA documentation understanding.  As per the docs, with clustering we can only achieve high-availability i.e, fail-over(where all the queues are mirrored across the nodes) not exactly load balancing right? 

Clustering serves more than one purpose. HA is one. Distributing load across *multiple* queues on multiple nodes is another.

> 
> Where load balancing is, when one of the node in cluster achieved peak level where that node cannot handle further queues. In this case newly generated queues has to go to other node in the cluster right?

Yes.

> But, I couldn't find this kind of behavior in the document. Can't we achieve these kind of behaviors with RabbitMQ clustering? 

Put an HAproxy in front of your cluster and make all clients connect to it. It will distribute connections and thus newly created
queues between cluster nodes.

There is an issue with data locality with this setup (your clients may be talking to a node other than the one that hosts
master for a queue it needs) but it still can be a significant improvement overall.

MK


More information about the rabbitmq-discuss mailing list