Load balancing connections to RabbitMQ cluster

1,129 views
Skip to first unread message

Adam Romanek

unread,
Oct 3, 2015, 5:17:58 PM10/3/15
to rabbitm...@googlegroups.com
Hi,

as already described on StackOverflow [1] I'm about to deploy a cluster
of RabbitMQ nodes to handle 100k+ or even 1m+ connections from IoT
devices. One of the main open questions that I have right now is
load-balancing incoming connections to the cluster. There are various
options like using a classic load balancer (AWS ELB, HAProxy etc.),
using DNS round-robin, or to make clients choose an appropriate node
based on an external entity like "Queue Metadata Store" described in [2].

Since I haven't received any responses on SO, I thought I would ask this
question here. What are your experiences with cluster connections load
balancing? What approach have you tried and would you recommend?

I'm also interested to know whether anyone has actually used the
approach with "Queue Metadata Store" [2]. It seems interesting but I'm
not sure it's worth it.

From what I see this topic has not been investigated and described
deeply enough. I hope you could share your experience with me.

Thanks in advance,
Adam Romanek

[1]
http://stackoverflow.com/questions/32320150/how-to-distribute-long-lived-tcp-connections-to-individual-nodes-e-g-to-rabbit
[2] http://insidethecpu.com/2014/11/17/load-balancing-a-rabbitmq-cluster/

Michael Klishin

unread,
Oct 3, 2015, 5:59:31 PM10/3/15
to rabbitm...@googlegroups.com, Adam Romanek
On 4 Oct 2015 at 00:17:57, Adam Romanek (romane...@gmail.com) wrote:
> What are your experiences with cluster connections load
> balancing? What approach have you tried and would you recommend?

Most users use HAproxy, Pivotal CF RabbitMQ service included. It works quite
well. “Least connections” is the connection distribution strategy that makes
most sense for a high number of mostly idle clients.

Pay attention to the proxy timeouts and heartbeat settings you use. 

I don’t think anybody on our team has experience with “queue metadata store”.
--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Laing, Michael

unread,
Oct 3, 2015, 7:28:59 PM10/3/15
to rabbitm...@googlegroups.com
We currently (in production) do a "2-step" using AWS ELBs: 
  1. the client goes thru the ELB to find a node, the node responds with its capabilities and address
  2. the client establishes a long-term connection directly to the node
Perhaps that approach will help.

Currently, however, we use a custom protocol over WebSocket, but we have been experimenting with MQTT.

We'll be interested in your experiences.

ml



--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send an email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages