Forum Discussion

Marvin's avatar
Marvin
Icon for Cirrocumulus rankCirrocumulus
Oct 24, 2019

Load balance decision based on client IP and datagroup value

I want to load balance traffic to a specific pool member based on the Source IP that is connecting to the VIP. I created the following Irule for that and a datagroup. The datagroup contains for e...
  • Marvin's avatar
    Oct 24, 2019
    when CLIENT_ACCEPTED {
     
    set clientip [IP::client_addr]
    set value [class lookup $clientip Datagroup]
     
    if { $value ne "" } {
     
    pool serverpool member $value 80
     
    } else
     
    {
    pool serverpool
    }
    }