4 ms·
I'm using two HAProxy machines and keepalived to ensure that if one goes down, the other takes over. Because HTTP in general and with that HAProxy is very stat
by pilif 12y ago
I'm using two HAProxy machines and keepalived to ensure that if one goes down, the other takes over.
Because HTTP in general and with that HAProxy is very stateless, this is really easy and safe to do. I've had the opportunity to fail over multiple times already (mainly for software updates, once because of a hardware issue) and I never had any problems with the setup.
- laggyluke 12y agoThis sounds like a split-brain disaster waiting to happen, when a network partition between the two load balancers makes both think that the other one is down.
- annnnd 12y agoI was running a similar system. What solution would you propose?
- laggyluke 12y agoI'm no expert, but I think the main idea is to have an odd number of nodes plus a consensus protocol like Paxos or Raft to figure out who's actually alive. If a node finds itself in a split minority, it won't become a master. This doesn't work when you have only two nodes, as there's no minority after the split, both sides are equal. Building this from scratch is extremely difficult and error-prone, so people usually use systems like ZooKeeper.
- regularfry 12y agoThis is why you only ever automatically fail over in one direction, and (ideally) can STONITH.