Forum Discussion
iRule: Direct request to specific server, but you use pool if that server is down not working.
- Oct 13, 2021
Hi Richard.
I suggest that you need to check pool member state before node choosing
when CLIENT_ACCEPTED {
if {[IP::addr [IP::client_addr] equals A.A.A.A] } {
if { [LB::status pool SERVICE_60006_pool member 1.1.1.1 60006] != up } {
pool SERVICE_60006_pool
}
else {
node 1.1.1.1 60006
}
}
elseif {[IP::addr [IP::client_addr] equals B.B.B.B] } {
if { [LB::status pool SERVICE_60006_pool member 2.2.2.2 60006] != up } {
pool SERVICE_60006_pool
}
else { node 2.2.2.2 60006
}
}
else {
pool SERVICE_60006_pool
}
}
I'm happy to help. Your way to make if statement posibble too, of course, just a matter of taste:)
Recent Discussions
Related Content
* 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