Is it possible to have 2 home assistants on the same network, the second being an identical back-up to the first?

I am wanting to know if it is possible to run home assistant as 2 instances, completely identical, almost like RAID1 ?

I ask this because if HA goes down, is it possible to have a second take over as the back up ?

Any suggestions would be very much appreciated.

I ran a second instance to beta test 2024.12.0 and had no issues.

Was there any latency between the two instances and were they named differently ?

You have to name them differently. And you need to move your Zigbee devices out of HA. I run my Zigbee2MQTT and Mosquitto outside of HA, using an Ethernet based coordinator.

What you’re looking for @MikeTMechanic is called a ‘high availability’ clustered application. It’s not easy to do this with HA as it would need to be designed from the ground-up to support it. The principal would be that all attached devices would communicate back to a single instance of HA (the shared cluster IP) and then a service in HA would write changes to all instances of HA to ensure consistency. Additionally you would need either a cluster-aware database or some way to syncronise the databases, and then you’d need independent storage systems as well as hosts.
Somebody did do this in the past using Docker and GFS, but it’s not an active project.

2 Likes

Many thanks Ronnie.

For me no, but I’m not using zigbee for anything.

In order for High Availability to work you need to research you devices and make sure that they can be handles by multiple hosts at the same time.
Zigbee have already been mentioned, but Z-wave is having the same issue.
Some WiFi devices are also limited on the number of control connection they can have.
The oft chosen solution is to make them to MQTT, which will make MQTT the single point of failure, but it is a simplier service and one which is pretty mature, so bugs are not that common.
MQTT allow for multiple HA servers to connect, thereby making it possible to run two HA instances and keeping them updated.

MQTT or ser2net. But then you have the issue of those services being a single-point-of-failure, so it’s a highway to hell really.