0

How can I configure Keepalived that when Master is available after falling, it will continue to route to backup until backup goes down. My currently configuration always routes to Master if it is available. When Master is gone, it routes to Backup and when Master is available again, it routes to the Master. I don't want that. I want it route whenever the current routed server is gone, not always to Master. So it can be understood like there are two Masters. Is it possible?

Servers are Ubuntu 18.04

1 Answers1

0

You can do this by defining state MASTER on both, and having priority set to the same value on both. You can use check scripts to decrease priority when you detect a failure. When the failure condition is resolved, both will have the same priority, but the one that is currently master will continue being a master.

Ephemeral
  • 31
  • 3
  • It is hard to understand what you are saying. What kind of script can change the priority during a working service and there must be a synchronization between two keepalived services. I dont have enough knowledge to do that. Is there any blog or tutorial for that? –  Feb 19 '21 at 05:19