Forum Discussion

vinceKahn_97184's avatar
vinceKahn_97184
Historic F5 Account
Apr 17, 2008

only redirect new http requests to outage pool

I'm trying to create an irule that checks active pool members and current sessions before sending them to an outage pool. If the user is already logged in and the pool members are down I don't want them to get redirected to the outage pool. Only new requests at this point should get the outage page. I've managed to key off the existence of the persistence cookie we set but I'm not sure this is the best or most dependable method to validate a current session. Is there a better method? Here's what I have:

 

 

when HTTP_REQUEST {

 

if { [active_members sso_pool] == 0 and ![HTTP::cookie exists BIGip] } {

 

pool sso_outage_pool

 

}

 

}

 

 

Thanks for your help.

 

Vince

3 Replies

  • nmenant provided a good rule-less solution for this using a fallback host on the HTTP profile (Click here).

     

     

    Aaron
  • vinceKahn_97184's avatar
    vinceKahn_97184
    Historic F5 Account
    Thanks I didn't see that. It appears from that thread the best way to validate an existing session is cookie.

     

     

    -Vince
  • You can configure the URL to redirect to in the HTTP profile on the VIP. nmenant pointed out that the default behavior when you disable a node is to still allow requests that have a valid persistence record or an existing TCP connections to continue. So you shouldn't need a rule.

     

     

    If you did want to use a rule, the one you wrote should work. Make sure that the cookie name is correct in your rule is correct. The default persistence cookie name is BIGipServerPOOLNAME.

     

     

    Aaron