Forum Discussion

Howard_Poz_1055's avatar
Howard_Poz_1055
Icon for Nimbostratus rankNimbostratus
Apr 03, 2006

Need Help - Override tcp session timeout due to Source_addr Persistence

New to iRules:

 

====================

 

Need assistance in getting traffic directed back to a "preferred" node when it comes back online - Essentially to over-ride the tcp session timeout value to the "failover server". This client is using source-address persistence. I found this tidbit and have been looking thru the postings:

 

 

"With this simple rule, and the proper pool configuration (I.E. a separate pool for your failure server[s] ) you can be sure that you aren’t persisting to the failure server, and that your users will be back to using the proper web servers as soon as they’re back online".

 

----------------------------------------------------------------

 

 

Not sure how to apply or if this is the right path:

 

 

rule nopersist_failover {

 

when LB_FAILED {

 

persist none

 

LB::reselect pool FAILURE_POOL

 

}

 

}

 

 

================================================================

 

 

Would appreciate assistance. Thank you very much !
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    The way this would be used in the scenario it sounds like you're outlining, is that you would create seperate pools for your "preferred" and "fallback" hosts.

    You would then configure your VIP to send traffic to the "preferred" pool, with no fallback host setup.

    Then, you'd put this rule in place, like you listed above:

    
    rule nopersist_failover {
      when LB_FAILED {
        persist none
        LB::reselect pool fallback_pool
      }
    }

    What this does is makes it so that if your preferred pool is ever unavailable, the iRule will route requests to your fallback pool, but only after disabling persistence. This means that as soon as the preferred pool is back online, requests will automatically be sent there again.

    HTH,

    -Colin