I'm experimenting with a pair of HAProxy servers in an HA load balancing configuration. What I'd like to do is get a pair of IP addresses to put in a DNS round-robin, and have keepalived maintain one VirtualIP on each HAProxy server and have the other keepalived process pick up the VIP if its regular server fails.

I can't be the first person to think of this kind of multi-master keepalived installation, but I can't find any examples out on the web. Does anyone have links to this use case?

  • I don't understand what the DNS round-robin has to do with keepalived in your question. Perhaps you can edit your question to elaborate. – wurtel Nov 27 '19 at 8:11
  • @wurtel - It was only by way of context. I'm going to have two HAProxy servers with a primary Virtual IP address each, where that VIP is managed by keepalived. I'd like to set the two keepalived instances so that they check on either other, and either will take over the other's VIP address if needed. – dafydd Nov 29 '19 at 6:49
  • That doesn't make much sense to me, you generally only have one VIP which is shared between servers; you don't have a VIP per server. So each server has its own IP, and in addition to that it may have a VIP assigned to it, and the VIP switches to another server if the current server becomes unreachable. – wurtel Nov 29 '19 at 8:20
  • @wurtel - To take advantage of the VIP, clients must point to the VIP all the time. This effectively means only one of the HAProxy servers is actually in use at any given time. If I want both HAProxy servers in continuous service, I have to give each of them a VIP. – dafydd Nov 30 '19 at 18:34
  • Maybe Linux IPVS is more what you need – wurtel Dec 2 '19 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.