Load blancing MQTT broker

后端 未结 5 1962
谎友^
谎友^ 2021-02-06 07:23

Is it possible to load balance MQTT broker? Can I use ELB to load balance MQTT? Any pointers in this direction would be helpful. I hit upon http://www.slideshare.net/kellogh/mqt

5条回答
  •  遇见更好的自我
    2021-02-06 08:19

    Load balancing MQTT brokers is not supported out-of-the-box by most MQTT brokers. There are brokers available which support clustering, though. Take a look at this list to find out a broker which suits your clustering requirements.

    This blog post is a bit dated but might still be useful if you want to learn about MQTT broker clustering: http://www.hivemq.com/building-a-high-availability-mqtt-cluster/

    To answer your question: The MQTT broker HiveMQ works perfectly with AWS ELB for load balancing across several availability zones. You might want to increase the default ELB timeout for TCP connections to your MQTT keep-alive time you are using for your application. You can even use Auto Scaling groups for scaling elastically if needed. HiveMQ can use S3 for the discovery of other cluster nodes so you can add and remove cluster nodes at runtime.

    I don't know if other brokers work as seamlessly with the AWS ELB. If HiveMQ does not suit your needs, best would be to search for a broker in the list linked above and try it :)

    Disclaimer: I'm working for the company which develops HiveMQ.

提交回复
热议问题