Forum Discussion

Andrea_Knapp_28's avatar
Andrea_Knapp_28
Icon for Nimbostratus rankNimbostratus
Mar 28, 2006

Pinning sessions to a node with a failover node

Currently I have a regular pool set up with active insert persistence, including 4 nodes. However we are seeing sessions expiring, from what appears to be the cookie from one node ending up on the wrong node. We are currently running 4.2PTF9 hoping to upgrade very soon, but not soon enough to solve this issue.

 

 

So as a 'quick/interim fix' I am trying to figure out a way to pin a session to one node, but if that node is down to have it 'failover' to a different node.

 

 

I have this, but don't think the logic is quite right:

 

 

pool Node1_only_pool {

 

min_active_members 1

 

member 192.6.9.22:9011 priority 10

 

 

}

 

pool Node2_only_pool {

 

min_active_members 1

 

member 192.6.9.23:9011 priority 10

 

 

}

 

 

rule my_rule {

 

if ( http_host starts_with "URLNAME" ) {

 

use ( Node1_only_pool )

 

}

 

else {

 

use ( Node2_only_pool )

 

}

 

}

 

 

 

I want to consistently use Node1 and only use Node2 if Node1 fails. Just not sure how to create a rule to see if Node1 is down.

 

 

 

Thank you,

 

Andrea

4 Replies

  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    Hi Andrea -

     

     

    Hopefully you've solved the original persistence problem by now.

     

     

    Regardless, you're actually pretty close on this, but no rule is required.

     

     

    You will need to create an application health monitor to verify the health of each node: Click here

     

     

    If you simply create a single pool with both members at differing priorities, with min_active_members set to 1, you should see only traffic to the higher priority member unless it has failed.

     

     

    You can put more members in the pool at different priorities for additional fallback targets in case of multiple failures.

     

     

    Since your app is stateful, you may still want to set persistence to prevent healthy sessions on node 2 from breaking state by jumping back to node 1 when it recovers.

     

     

    Good luck!

     

    /deb

     

  • zafer's avatar
    zafer
    Icon for Nimbostratus rankNimbostratus
    Hi deb,

     

     

    i have pool_a and members node1 and node2

     

    node1 priority 2 and node2 priority is 1

     

     

    if node1 goes down and connections will come to node2 but when node1 come back (available) i dont want send traffic to it if it possible i want set with date

     

     

    how can i do ?

     

     

    regards

     

     

    zafer
  • Hi All,

     

     

    I'm new to IRule. We have a webfarm and created separate pools for each server. we send the traffic to a particular pool by examining the uri (eg. if uri contains server75 then pool server75). We also have a pool for general use just in case the specfic pool is not present in the uri. The first time accessing a specific pool works but if there is a redirect where the specific pool is not mentioned in the uri, the traffic sends to the pool that is for general use.

     

    Is it possible to pin the session to a pool?

     

     

    Please help.