<div dir="ltr">haproxy is a common method that you can play with via software, F5 load balancers for hardware, pretty much any standard balancer will work. Heck I'd imagine you could almost use apache httpd and proxy support to do this. They just have to be configured correctly and then choose your load balancing mechanism appropriately, and support a lower level tcp/ip connection since the AMQP protocol is NOT http (we hit this initially until networking realized that these aren't short lived simple http connections). Though beware, if you use a feature most load balancers have of monitoring the back end through tcp/ip connects to the port (5672), you'll have a LOT of messages in your log files where you'll see what are essentially half opened connections to Rabbit. This is pretty normal though as the load balancers aren't trying to really connect, just verify that the port is still open before rerouting traffic to a different node.<div>
<br></div><div>A lot of these kinds of decisions tend to be organization specific. Does your organization use physical load balancers everywhere and have good policies in place to use them, or do most people have software load balancers, cloud load balancers, etc.</div>
<div><br></div><div>We use F5 LTM's ourselves, with a least open connections algorithm I believe (might be a round robin though - I don't recall immediately). It's worked pretty reliably, once we set the load balancer to not reap connections until 615 seconds have passed (default heartbeat in rabbit was 600 seconds as I recall).</div>
<div><br></div><div>Jason</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 12, 2014 at 1:28 AM, Michael Klishin <span dir="ltr"><<a href="mailto:mklishin@gopivotal.com" target="_blank">mklishin@gopivotal.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><br>
On 12 Mar 2014, at 08:41, <a href="mailto:lcassa8@gmail.com">lcassa8@gmail.com</a> wrote:<br>
<br>
> I created 3 server cluster of RabbitMQ. As per documentation, RabbitMQ client code does not support connection management to the cluster. It only connects to one broker at a time. I wanted to find out that in order to distribute load what usualy people do for RabbitMQ.<br>
<br>
</div>Any strategy that achieves a reasonably even distribution. Picking a random node will<br>
likely be good enough for many environments.<br>
<div class=""><br>
> Do you use simple Load Balacer or write your own code to manage connections, connection pooling etc?<br>
<br>
</div>It’s a common strategy to use a load balancer in front of a cluster and make clients connect to it. Note that<br>
you may need more than one load balancer and clients need to be able to connect to the first reachable one.<br>
<br>
If you use RabbitMQ Java client, it can connect to the first reachable node from a list.<br>
<br>
MK<br>
<br>
Software Engineer, Pivotal/RabbitMQ<br>
<br>
<br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Jason McIntosh<br><a href="https://github.com/jasonmcintosh/" target="_blank">https://github.com/jasonmcintosh/</a><br>573-424-7612</div>
</div>