Specify node based on Client IP, but what if that node is down?
I been trying to figure this out and unable to find an exact answer. I have multiple unknown clients connecting to a virtual address. I also have 2 known clients connecting to the same address. I want them all to round robin as normal, but I always want these two known users to connect to specific nodes. I have persistence configured so when they connect they will stay on which ever node they connect to, this is for everyone. I think I have the iRule figured out.... but what if one of the specified nodes goes down, how do I get that known user to just hit a random node until it gets back up? This is what I am trying. The rule will check the first Known User's IP then send it to node 1, see the second known user and send to node 2, everyone else will hit the pool and round robin as normal. The last part is if node 1 goes down and doesn't respond, it will just hit the pool and round robin to what is available. Is this right, or am I missing something?
when CLIENT_ACCEPTED {
if {IP::addr [IP::client_addr] equals 172.1.1.1] } {
node 1.1.1.1 60006
} elseif {IP::addr [IP::client_addr] equals 172.1.1.2] } {
node 2.2.2.2.] 60006
} else {
pool servers_60006_pool
}
}
when LB_FAILED {
servers_60006_pool
}