Forum Discussion

Thomas_Greco_11's avatar
Thomas_Greco_11
Icon for Nimbostratus rankNimbostratus
Dec 20, 2005

Persist Session to Node

I currently have a pool setup containing 3 nodes, which uses cookie (insert) persistence. This works with a VIP that uses a BigIp SSL Server-side cert. The LB method is Round Robin.

 

 

This is working fine, but I now want to be able to persist sessions that initiate an http session with the URI "/csconsole" to be persisted to node 3 for the life of the session. What is the best way to accomplish this? What event in the IRule should I use if this is the solution?

 

 

Once a user establishes a session with the "/console" portion of the site, the URI does not necessarily contain the base URI "/csconsole" for the life of the session even though the user is actually still in that particular area of the application. I'd like to able to have an IRule to be invoked only when the initial HTTP session is aquired, and the IRule then persists the session to a specifc node for the life of the session, regardless of what the URI is used in the future. How would this be accomplished?
  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    Sounds like you want to use a combination of cookie persistence and direct node selection. So something as simple as this should do the trick:
    when HTTP_REQUEST {
       if { [HTTP::uri] starts_with "/csconsole" } {
          use pool foo member 10.0.0.3:443
       }
    }

    Assuming you have cookie persist on the virtual, then once the session goes to pool member 3, the persistence will be updated and locked onto that member for the remainder of the session.