[rabbitmq-discuss] Recommended haproxy config

Tim Watson tim at rabbitmq.com
Mon Nov 5 14:36:44 GMT 2012


Hi

On 1 Nov 2012, at 19:48, Dave Curylo wrote:

> I am running an active-active RabbitMQ cluster, and as recommended by "High Availability in RabbitMQ: solving part of the puzzle" (http://www.rabbitmq.com/blog/2011/10/25/high-availability-in-rabbitmq-solving-part-of-the-puzzle/), I'm connecting to the cluster of message brokers via an haproxy load balancer.  Everything was working fine until one of the nodes failed, after which it seemed that the haproxy load balancer did not appear to detect the failed node.  Clients would initiate connections and often just hang, I assume because the load balancer is forwarding them on to the failed node.

Well, you've got tcp keep-alives enabled at the TCP/IP stack level, so one would expect broken connections to be detected by ha-proxy in this case. The exact behaviour of tcp keep-alive is determined by the underlying OS/Kernel configuration - see `man tcp` on linux for more details. I notice that you've set `timeout server` to 50 seconds - could the interplay between this setting and tcpka be causing the delay here? How long are clients seeming to 'hang' once a node has failed?


More information about the rabbitmq-discuss mailing list