[rabbitmq-discuss] RabbitMQ Clustering and HA Approach

Michael Klishin mklishin at gopivotal.com
Fri Apr 18 09:31:06 BST 2014


On 18 April 2014 at 10:30:08, srikanth tns (srikanthtns at gmail.com) wrote:
> > 1) we are planning to have 3 node cluster . It appears like all  
> the queues are connected to the master. Will all these queue connections  
> create load on master rabbitmq ? for ex , 15000 tcp connections  
> to same port/ip.
> or will the other nodes in the cluster be able to handle the load  
> and the messages from mcollective ? can you brief me how the messages  
> are routed to the queues within the nodes ?

15K connections to a single node is not very many but your client can connect
to any node, so it can be, say, 5K per node.

Make sure your OS settings allow RabbitMQ to use enough file descriptors.


> 2) we have HA'ed the queues with ha_mode=all , for these 3 nodes  
> , will this cause any performance issue ? if the master is down  
> and come over a new slave node to the cluster , will it handle the  
> load as before ?

Mirroring to 3 nodes requires RabbitMQ to do more work than mirroring to 2 or 1
node. However, what matters more is whether your consumers connect to queue
masters. Every queue in a cluster has a master node and other nodes forward
requests (that involve the queue) to it. Publishing and consuming from master
improves data locality but also requires your clients to be a bit smarter
when reconnecting.

Queue master can be determined using HTTP API.

> 3) what is the scalability solution we need to look into incase  
> we have more connections coming into the application ?

You can simply add nodes and distribute connections between them roughly evenly.
It’s not uncommon to put a load balancer in front of a cluster to help with this.

It really depends on if your message rates and latency requirements require
publishing and consuming from master. Simply distributing connections between
node is pretty trivial.

HTH. 
--  
MK  

Software Engineer, Pivotal/RabbitMQ


More information about the rabbitmq-discuss mailing list