[rabbitmq-discuss] loadbalancer configuration for clustered rabbitmq cluster.

Anuj Lal alal at adchemy.com
Wed Oct 31 17:09:41 GMT 2012


I have set up clustered HA two node rabitmq cluster – one running in file mode and other in in memory.
This takes cares of continued flow of messages if one node in cluster is down. I am still testing this scenario.

Load balancing to consumer side ( worker queue or consistent hash  exchange etc) is working. I have got question regarding some load balancing from producer to broker side.

Lets say our load requirement is very very high and one cluster of rabbitMQ is not sufficient to handle  that large load.  To handle very large load,  and to test this configuration I am thinking about create another cluster of rabbitMQ and put both cluster nodes behind  load balancer.  I have  following question


  1.  Is this  approach recommended or tried by anyone.
  2.  What configuration I need to specify in load balancer ? For example, I need to specify server addresses in load balancer. If I have cluster of server, can I specify  like this

            server  cluster1server1.dev.aws.xyz.net:5672,cluster1server2.dev.aws.xyz.net:5672
    server  cluster2server1.dev.aws.xyz.net:5672,cluster2server2.dev.aws.xyz.net:5672

   3. If I don't use load balancer, I use cache of connection like this
      <bean id="connectionFactory"
class="org.springframework.amqp.rabbit.connection.CachingConnectionFactory">
<property name="username" value="${message.broker.apr.userName}" />
<property name="password" value="${message.broker.apr.password}" />
<property name="channelCacheSize" value="${message.broker.numberOfCachedChannelsForBroker}" />
<property name="addresses" value="
cluster1server1.dev.aws.xyz.net:5672,cluster1server2.dev.aws.xyz.net:5672"  />
</bean>

        How can I specify these if I am using load balancer?

In short anybody has used clustered HA rabbitmq behind loadbalancer.  If this option is not recommended than other option I was thinking about cadd more node in a sinle cluster and add other exchange and node, but in that case publisher is going to do round robin kind of mechanish to balance load between two exchanges.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20121031/e22b815b/attachment.htm>


More information about the rabbitmq-discuss mailing list