1

Have a bit of an odd situation. I need to set up a singular VIP with keepalived that will bounce among machines as they fail/come down, etc. I have four total servers, each running a database application. The reason I need this setup is because the particular database application we're using is stateful with regard to the way it syncs. I can't just have any machine come up at any time.

They're setup as two master/slave pairs. When A fails, I need C to take over. If C then fails, I need D to take over. The premise in this situation is that if A fails, I want to rebuild A and B. The same would apply if C fails, I'd want A to take over. Then B, if A also fails. I only need to survive double node failure.

Is there a good way to set this up with keepalived, or am I stuck doing something like scripting to stop keepalived on say, B, when A fails so that it will never take over?

Server Layout

James
  • 111
  • 1
  • What have you tried so far, and in what way didn't it work? A combination of check scripts and custom standby priorities should do what you want, at any rate. – womble Oct 10 '18 at 02:40
  • I think my biggest confusion point is, if I'm running keepalived on all 4 boxes...say A fails. I can have A/C running as higher priority, for instance and it'll transition to C just fine. But when C then fails, how do I ensure that D takes over, and B doesn't try to enter the mix? Differentiating their priority levels doesn't really make sense to me because then I'd have the same problem if it failed in the opposite direction. – James Oct 10 '18 at 02:53
  • Use a check script, then, to dynamically modify the priority of B/D depending on which of A/C are down. – womble Oct 10 '18 at 04:45

0 Answers0