CSR: 2nd Update

23rd September 2020
Uncategorised
0

Since there are so many ways a HA system can go south I have decided to follow my made up rules to make "the contraption" good enough (crude is in the name right?):

- Node1 is always the master to begin with,
- Node1 is the only one running the replication script (status 0 if all is ok with the node),
- The replication script stops running when keepalived encounters problems (status 1),
- After any failure / failover the user is required to put everything back to the original state,
- Keepalived on Node2 does not start automatically after a reboot,

Here are just few case scenarios that Crude SQLite Replicator can handle.

Node1: Apache Web Server Failure

N1: Apache Fails
N1: Keepalived Failover
N1: Status 1 (rep script will not run anymore)
N2: Becomes a Master

Node2: Apache2 Failure

N2: Apache Fails
N1: is still the Master

Node2: Power Failure & Reboot

N2: Power Fails & Reboot
N1: Still a Master
N2: Keepalived does not start

Node1: Power Failure and Reboot

N1: Apache Fails
N1: Keepalived Failover
N1: Status 1 (rep script will not run anymore)
N2: Becomes a Master

Node1 & Node2: Power Failure & Reboot

N1 / N2: Power Fails & Reboot
N1: Becomes a Master
N1: Rep script on hold
N2: Keepalived does not start

These are most likely not all of the possible scenarios that can occur but it is be good enough. While testing I have been thinking of a healing strategy and it all seems like I will need to create a routine that is initiated by hand to just move data from Node2 to Node1 (in most cases). And if anyone has spotted already there is no path of consistency when a second failure happens. It could be just fine of it could be catastrophic (depending on which one happened after which). My script will be re-evaluated and tweaked over the next few weeks so I get the most out of it. Keep in my that this is not a high availability method to be deployed in a mission critical industrial environment (I am not sure if it classifies as HA at all...).

Hey, like this? Why not share it with a buddy?