Score:0

Keepalived and HAProxy on 3 VMs

in flag

I have a setup with 3 nodes each has keepalived and HAProxy installed. Keepalived is installed on the VM but HAProxy is running as part of a docker swarm. HAProxy is running on host network mode.

          --VM-1-----------------------------                   
          |                         HAP-1   |
requests  | ___________________    _________| 
=========>| |VIP + Keepalived | => |HAProxy|| 
   ||     | |_________________|    |_______||
   ||     -----------------------------------
   ||
   ||     --------VM-2-----------------------                   
   ||     |                        HAP-2    |
   ||     | ___________________    _________|
   ======>| | Keepalived      | => |HAProxy||
   ||     | |_________________|    |_______||
   ||     -----------------------------------
   ||
   ||     --VM-3-----------------------------                   
   ||     |                         HAP-3   |
   ||     | ___________________    _________|
   ======>| | Keepalived      | => |HAProxy||
          | |_________________|    |_______||
          -----------------------------------

At first the VM-1 and HAP-1 are active. When a failure happens on VM-1 the VIP (say for example) move to VM-2. I would like the HAProxy to be on the same machine as the VIP (i.e. HAP-2). When I test the setup it by stopping the keepalived service on VM-1, it just moves the VIP to VM-2 and the HAProxy continues to work on the VM-1. I think docker ingress is handling the connection to HAProxy and routing it to HAP-1 where the keepalived was stopped. Is it possible to switchover the VIP + HAProxy to one of the standby VM ?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.