0

As per the figure below, suppose there are two load balancers bundled together using Keepalived. My question is: does each LB have to get public IPs (namely 10.0.0.3 and .4) assigned to their public interfaces? Can they just listen to the VIP (with nonlocal_bind enabled) and not consume any public IPs?

        public 10.0.0.0/24
               |
           10.0.0.2 (vip)
             /   \
      10.0.0.3    10.0.0.4 
         lb1         lb2
    192.168.0.3   192.168.0.4

Thank you very much.

  • I'd say they need to ARP for the VIP, otherwise the gateway can't forward the packets destined for the VIP to the load balancer. This implies that only one load balancer can have the VIP, i.e. a failover setup. The non-active load balancer doesn't need to have a public IP, as long as there is some way that the load balancers can see each other to determine whether to become master or not. – wurtel Jan 11 at 15:46
  • @wurtel Thank you for the reply. I noticed that I would have to assign IPs on the external interfaces in order to start the Keepalived process. Otherwise, I would receive an error message saying like "Cannot find an IP address to use for interface ens3". The two "dummy" IPs can also be in different networks from each other and they can also be in different networks from the VIP. So it seems that the interface used for VIP has to have an IP to work properly. – cody Jan 12 at 3:31

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.