Forum Discussion

Richard_D's avatar
Icon for Altostratus rankAltostratus
Sep 10, 2021

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?




 if {IP::addr [IP::client_addr] equals] } {

 node 60006

 } elseif {IP::addr [IP::client_addr] equals] } {

 node] 60006

 } else {

  pool servers_60006_pool



when LB_FAILED {




2 Replies

  • Hi

    You could use LB::status for this. So before you send the client to the node, check to see if it is up. If it is then send to the node otherwise do something else. Something like...

     if {[IP::addr [IP::client_addr] equals] } {
        if {[LB::status node] eq "up"} {
     node 60006 } else {
     #Do something