I'm implementing a solution for IoT/home automation, starting first test on my house...

Is going to use MQTT to exchange messages using a central broker model.

This are the components: cloud server, central home server, home nodes [sensors+actuators].

At the moment I have the MQTT broker on my home computer... My question is, what is better for performance/security/scalability

  1. have the MQTT Broker at my house and if central server fails, have devices communicating with cloud [nodes have also 3g connections via API]
  2. have the MQTT Broker at the cloud and coordinate all from the internet
  3. have a hybrid approach where if home server is down, it uses cloud server for broker

is there other option I'm not aware of?

What levels of performance/security/scalability do you need? How vital is it that the service remains available? Are you concerned about loss of timely updates or loss of previously recorded data? What quality of service are you using? How reliable is your internet connection / 3G connection?

There are a number of cloud services that now provide a managed MQTT broker, some with free plans. IBM, AWS, MS. These will relieve you of the burden of managing the server, backup, etc.

If you don't need >99.99% availability then this is probably all you need. If you want to be sure of keeping the messages flowing even if your connection goes down, then a local server might help. I'd probably try 3 but the other way around. Use the cloud service when it is available and fall back to a local machine if necessary.

I would consider a 2 tier architecture for this. The end devices should connect to local MQTT broker on the local network feeding to a local host-control system which will act as the controller + aggregator of data which can then communicate with a cloud based broker for external connectivity to a dashboard provider.

Of course you can play around with various combinations of this architecture which suits your needs.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.