Advice needed: MQTT on NAS or on HASS system?

I currently have all my MQTT data stored on my HASS system. However, I was experimenting with MQTT on my NAS. I am able to connect to the NAS as well.

So, I was wondering with you guys are doing. Do you store your MQTT data on the NAS, or do you keep it on your HA system.

Looking to find some inspiration/advice on this issue.

I currently have my MQTT Broker on the same machine as HA, although I have been contimplating moving it to a separate machine for reliability. I run HA, and my broker, and because it is related my Zwave2MQTT are all running on containers on the same machine.

Thank your for your answer.

I run my MQTT server on a separate Pi (my Pi-hole server)

1 Like

I am trying to figure out what the advantage would be to run MQTT on a different system.

I run mine separately as a cluster.

Scalability and reliability. Having MQTT running on a separate machine from HA, along with Zigbee2MQTT and/or Zwavejs2MQTT running on separate machines means that should HA go down for any reason, my devices can continue to work.

1 Like

Hi @Lifelogger

For essential services, I have services running in podman containers in high availability with 3 keep keepalived VIPs ( I need 3 IPs due to running 3 piholes - long story left for another day)

To conserve power I do not run the master and slave servers 24/7. If the master going down for patching, reboot or a failure the router wakes up the slave from sleep.

The key thing is to ensure that there is smooth instant failover and fallback between the servers which means that services should be ready and running on both servers. I solve this by ensuring that services are able to start even if there is no IP to bind to by via this kernel parameter

net.ipv4.ip_nonlocal_bind=1

For example here is my mail server which is running on both servers, notice that they are both binded to the same IP address ? My network clients will only see the master IP address until that server fails traffic will be routed over to the slave

Once I’ve gained some experience of HA and have gained the confidence that I wish to continue using HA I may just include HA core into this setup so the master runs full HASS in a VM (no choice in this matter unless I can get it running in LXC) and the slave runs core with the config synced from the master regularly

@code-in-progress Hi Bill,

What type of cluster are you using ?
Many thanks in advance !
Cheers

I use emq’s built-in clustering. For me, emq processes faster than mosquitto does (and is much more robust, imho).

Thanks guys. Going to look at moving my Matt broker to my NAS.