Running RabbitMQ behind HAProxy

asked 2014-07-28 17:04:40 -0500

rooter gravatar image

updated 2014-07-28 18:05:46 -0500

What are the merits of deploying a cluster of RabbitMQ servers (e.g. with mirrored queues) behind a haproxy? It seems using HAProxy in front of RabbitMQ is Red Hat's way of doing things:

http://openstack.redhat.com/RabbitMQ

Does anyone have any experience with such setups? Is it actually worth doing, or should we drop haproxy and stickwith using "rabbit_hosts=..." in openstack config files?

Would you recommend setting up haproxy for rabbitmq in 'round-robin' mode, or 'backup'?

One could argue that using haproxy in round-robin evenly distributes the load among the haproxy servers, whereas using when rabbit_hosts all traffic tends to hit the first server on the list, and only goes to the second host once the first one drops dead. Is there any way (or need) to influence that?

Should we handle rabbitmq-server which were freshly started and did not yet had their queues synchronized in some special way? (What if a host connects to such a node to consume a message from a unsynchronized queue)?

We had a multi rabbitmq-server test deployment running, but could not tweak the timeouts in such a way to avoid getting "connection reset by peer" (connection to rabbitmq-server) errors in the log files of almost all OpenStack services every now and then.

Ideally we would like to use zeromq (due to its lack of single point of failure), but it seems it's not really properly supported in all OpenStack services yet (e.g. Icehouse Neutron has problems with it...)

edit retag flag offensive close merge delete