cvb941 / HAHA

Highly Available Home Assistant - a solution for running a redundant installation of Home Assistant
302 stars 30 forks source link

Include HAProxy for MQTT Loadbalancing/Failover #4

Open Makr91 opened 4 years ago

Makr91 commented 4 years ago

Hello,

I think that it would be helpful to add a Reverse proxy like HAProxy in order to handle the failover and load balancing for the MQTT communication.

Here is a project that would be a good starting point:

https://github.com/lelylan/haproxy-mqtt

cvb941 commented 4 years ago

Hello, thank you for your message and sorry for late answer.

Unless you had something else on your mind, the problem is that the reverse proxy itself would have to be HA or external to the cluster, or the cluster would depend on it too.

Also, docker swarm already does load balancing and failover between containers of the same service, how would the project you linked differ?

Makr91 commented 2 years ago

Sorry to dig up an old issue, just going through my git hub issues.

We utilize pfSense and CARP so we do a floating IP for applications that need to be highly redundant. We more or less deal with VMs and less containers. If I can get this to work for a home environment that replicates our DC, by using pfSense and CARP, with OmniOS as the Host and bhyve as the hypervisor we can highly efficient converged haha instances.

I hadn't invested much into the project above, I was more or less giving an example of a way to get MQTT into a highly available state with something like HAproxy without relying on containers.

You can probably close this if you want, but it was more or less a suggestion to see if it would fit the core project in some way.