lundi 31 août 2015

How to distribute long-lived TCP connections to individual nodes, e.g. to RabbitMQ nodes in a cluster?

I'm about to deploy a cluster of RabbitMQ nodes in AWS. I expect there would be 100k+ (possibly 1m+) clients - IoT devices - which will connect to the RabbitMQ cluster over MQTT and will stay connected 24/7/365.

Now the question is: how to distribute the TCP connections from clients to individual nodes comprising the RabbitMQ cluster? I see a couple of options:

  1. Use AWS Elastic Load Balancer
  2. Use HAProxy on AWS EC2
  3. Use DNS round-robin
  4. Use DNS SRV (e.g. like in SIP service deployments)
  5. Use a custom hand-written client-side load balancing algorithm, based on a list of addresses obtained from a server or hard-coded into the device

Which solution from the ones listed above would you recommend given the amount of load and the expected duration each connection? Or maybe a combination of these? Or is there any other solution worth knowing?




Aucun commentaire:

Enregistrer un commentaire