Clustering option

Hi, I’m using cluster mpi on pi 3. As HA isn’t made for cluster. Is it possible to easily cluster HA?
Check: http://www.tinkernut.com/2014/04/make-cluster-computer/

1 Like

Why would you need to cluster HA?
It’s has very low resource requirements and I’ve personally run it on a rPi gen 1 B,rPi B, rPi B2 ,rPi 3 and a beagleboard without any problem.

Well, I’m not sure if Raspberry Pi Zero might require clustering… Why not just communicate with MQTT instead?

I’ve installed HA for a friend using 3x pi3. HA is connected to a ton of WEMO sensors/switches (house with 12 rooms). If the house is busy -> HA reaction time has a delay (in seconds)…using 1x pi3

I’ll check into the MQTT option…

HA has support for Multiple instances.

This might be an option for you?

Aah GREAT! Thanks @Landrash!:sunglasses:
Last question, where is the explained edit done in the config?

Will this allow a high-availabillity setup?
When the master somehow breaks, can a Slave automatically replace him?

This would be also interesting for me. Any success with that so far?

Multiple Instances is marked as deprecated and no longer supported. So this question is no longer “solved”.

Long term I’m also interesting in clustering HA, not for performance reasons, but simply for failover purposes.

My home has now go to the point where it’s highly dependant on my automation tech working properly - for this reason I’ve moved away from HomeKit / Homebridge because it’s just too unreliable for the scale of my automation now.

So in summary, I guess this could work using a fairly tradition HA architecture, but would require the use of off board radio’s/hubs to work well.

You’d have two machines, each running home assistant. The “front end” IP would be CARP’d with a virtual IP, which would be the one you’d configure to talk to your devices and hubs.

You’d then somehow have to sync the state and config files between your slave and master, which should be fairly straight forward for config, may be more difficult for state.

You’d then have to have a heartbeat between them both, when the heartbeat drops the slave picks up and start’s ARP’ing the MAC address of the slave NIC as owning the virtual IP.

I’m not sure how much will be possible without coding changes in HA, my gut feel is it probably would be possible as you are effectively just layering tech that already exists on top of HA? You’d then need to stop / start some services / change some config depending on if the HA instance in question was the “master”…

I can’t code, but I have experience in typical IT Infrastructure stuff (servers, networking, storage, DB etc) - so happy to try and help on this as much as I can!

3 Likes

For those who rely on MQTT(like me): https://github.com/nragon/keeper
This checks MQTT connection (will restart mqtt if needed) and exchanges messages with HA in order to understand if it’s running (will also restart HA if these messages are not exchanged).
Still finishing hassio but systemd setup is already available.
Could be some sort of high availability.

Hello everyone,

I have created a project called HAHA (Highly Available Home Assistant) which creates a highly available cluster of Home Assistant, MariaDB and Mosquitto. It is based on Docker swarm and synchronizes HA files using GlusterFS, so that all nodes can act as a failover.

See more information in this thread HAHA - Highly Available Home Assistant.

3 Likes