Forum Discussion
sandiksk_35282
Altostratus
Apr 21, 2018irule to force traffic to a particular server.
I need some help as we are forcing some reverse proxy server traffic ( acting as source ) to go a specific pool member
Reverse Proxy Server 1 ------------------> Pool Member 1
Reverse Proxy Ser...
Simon_Blakely
Employee
Apr 22, 2018when CLIENT_ACCEPTED {
if { [IP::client_addr] == "10.20.1.111" }
{ pool prod_443 member 10.9.41.25 }
elseif { [IP::client_addr] == "10.20.1.142" }
{ pool prod_443 member 10.19.41.24 }
}
Your irule selects specific pool members for each client IP.
There is no provision for a load-balancing decision if the selected member is unavailable.You need to check the status of the pool member with LB::status
Something like the following, although I have not tested this ...when CLIENT_ACCEPTED {
get the default load-balancing pick
set mypick [LB::select]
if { (([IP::client_addr] == "10.20.1.111") && ([LB::status pool prod_443 member 10.9.41.25 443] eq "up")) }
{ pool prod_443 member 10.9.41.25 }
elseif { (([IP::client_addr] == "10.20.1.142") && ([LB::status pool prod_443 member 10.9.41.24 443] eq "up")) }
{ pool prod_443 member 10.19.41.24 }
the default pick is chosen
else { eval $mypick }
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
