Score:0

Keepalived load balancing not working on Fedora 38 - 2 nodes(VMs) setup

sh flag

I am trying to set up keepalived load balancing on a system setup composed of 2 fedora 38 VMs.

I've already setup a VIP on these 2 machines, which works as expected. Now I am trying to set up load balancing, but this part doen't want to work.

My keepalived.conf for node 1 is :

vrrp_instance VI_1 {
  state MASTER
  interface ens18
  virtual_router_id 55
  priority 150
  advert_int 1
  unicast_src_ip 192.168.1.199
  unicast_peer {
    192.168.1.84
  }

  authentication {
    auth_type PASS
    auth_pass ***
  }

  virtual_ipaddress {
    192.168.1.100/24
  }
}
virtual_server 192.168.1.100 80 {
  delay_loop 6
  lb_algo rr
  lb_kind DR
  protocol TCP

  real_server 192.168.1.199 80 {
    TCP_CHECK {
      connect_timeout 10
    }
  }
  real_server 192.168.1.84 80 {
    TCP_CHECK {
      connect_timeout 10
    }
  }
}

My keepalived.conf for node 2 is :

vrrp_instance VI_1 {
  state BACKUP
  interface ens18
  virtual_router_id 55
  priority 100
  advert_int 1
  unicast_src_ip 192.168.1.84
  unicast_peer {
    192.168.1.199
  }

  authentication {
    auth_type PASS
    auth_pass ***
  }

  virtual_ipaddress {
    192.168.1.100/24
  }
}
virtual_server 192.168.1.100 80 {
  delay_loop 6
  lb_algo rr
  lb_kind DR
  protocol TCP

  real_server 192.168.1.199 80 {
    TCP_CHECK {
      connect_timeout 10
    }
  }
  real_server 192.168.1.84 80 {
    TCP_CHECK {
      connect_timeout 10
    }
  }
}

I've aslo tried the instructions provided here: http://kb.linuxvirtualserver.org/wiki/Building_Two-Node_Directors/Real_Servers_using_LVS_and_Keepalived but in vain.

Any idea what might be wrong? Is the keepalive load balancing even possible on my setup?

Thanks

I sit in a Tesla and translated this thread with Ai:

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.