I have this iRule that works, but it seems there should be a way to do this more efficiently. Can anyone help out with this? I don’t know if the switch command would be of an value here.
Thanks
when CLIENT_ACCEPTED {
if {[
matchclass [IP::local_addr] equals $::NG_Bypass_IP] or [active_members NG_Pool] == 0 and [active_members Cache_Pool] == 0 or not [matchclass [IP::client_addr] equals $::NG_Clients] } {
forward
}
elseif {
[active_members NG_Pool] > 0} {
pool NG_Pool
}
elseif {
[active_members Cache_Pool] > 0 and not [matchclass [IP::local_addr] equals $::Cache_Bypass_IP]} {
pool Cache_Pool
}
else {
forward
}
}
when LB_FAILED {
reject
}