High Availability HA


#21

Very nice and simple. Can it be used to talk to other devices in the same way over MQTT?


#22

Currently, the main focus is HA. Yes, the mechanism could be applied to other services but they would’ve to implement the heartbeat mechanism to send messages to keeper. Personally I think this project should, for now, focus on Home Assistant which is the principal point of failure. That said, this only performs service restarts but I’m open to suggestions such as backups (or others) which is another piece of high availability.


#23

nragon, very nice indeed.
Digging into HAProxy, could we have multiple instances on this one… What I mean is that ‘entry-points’ should always respond. I saw some pictures about only one entry point, the load balancer, but what if that craps out.


#24

Historically, load balancers are by default a single point device/service and subject to being a SPOF but ordinarily, the load balancer is the only software on the device and is therefore very stable.

Generally, you can’t foolproof everything but, if you ensuring failover or redundancy on the most complicated pieces, that will greatly reduce risk.

My goal is to have redundant access points, redundant HA hub, redundant database, redundant MQTT and backup power for everything. Outside of that, having replacements of the rest (like network switches, routers, cables, etc.) and a restore plan that is documented, is about as good as you really need. Ultimately, making sure that your home automation system fails dumb instead of stupid, is your overall best possible scenario.

I wrote up my goals and assumptions as someone who is designing my system for a person who has a disability (my wife) in this article if interested.


#25

I think load balancing is not the main issue here. Availability is. Does any of you get 100%+ on HA?
@AndrewHoover, Keper can totally evolve into an active/passive approach deployed in multiple machines. Currently the downtime is the time needed for HA to start.


#26

So, I was reading up on Docker, and stumbled upon Docker Swarm.
Seems that with its setup of ‘managers’ and ‘worker’ nodes, High Availability can be achieved.

nodes can be both physical or virtual.
So with ‘Docker on Docker’ we could add Raspberries or other hardware that runs docker and add it to a cluster.

Found a very nice tutorial here:

Official documentation:


Found out about swarms when I stumbled upon this: (4pi’s, 2 managers and 2 workers)

Cheers.


#27

These are some great resources. Thanks for the links!

I wonder how “swarm aware” HA would need to be to pull this off effectively.


#28

Read on here, seems that it’ll work. user quasar66 has a pretty decent setup running!