Horizontally scaling mosquitto broker
Asked Answered
O

1

17

I am considering mosquitto for a MQTT broker. From what I've read, I realized that Mosquitto doesn't support Horizontal Scaling.

So far all other criteria of my requirements can be met with Mosquitto.

I'm not sure if the question is too generic or broad but what I want to know is, if there's any way to achieve Scaling capabilities, Load Balancing etc. for Mosquitto.

Ochone answered 3/7, 2015 at 9:39 Comment(0)
P
10

Mosquitto can scale horizontally with is bridge capability where one Broker copies all messages to another Broker.

You can see a basic configuration example here: http://e.verything.co/post/62163759361/bridging-two-mqtt-brokers

You also should take a look at the MQTT Malaria to test the scalability of your setup https://github.com/remakeelectric/mqtt-malaria

Pancreas answered 8/7, 2015 at 23:36 Comment(5)
For correctness it has to be mentioned that also other options exist to reach a high scalability. Several brokers support clustering (also open source ones like verne.mq or rabbitmq.com) which tackle the challenge of scalability in a different way. Typically, the subscription and session state is available on all cluster nodes enabling that a MQTT cluster appears to a device as one big server.Ponton
Example provides way to connect only 2 brokers using bridge. Is is possible to scale to more than 2, say, 10 brokers using bridge and with no loops?Northway
I don't consider this scaling, because all messages still go to both (indeed max=2) servers. You need a system that can move subscriptions between nodes, so that messages and their interested parties can all be connected to the same node, but all users can be distributed over nodes.Milliken
The provided link is not available, can you provide another one because I can't find any explanation.Mullock
github.com/mqtt/mqtt.org/wiki/server-supportAphorism

© 2022 - 2024 — McMap. All rights reserved.