Forum Discussion
Adam_24063
Nimbostratus
Mar 19, 2007persist based on cookie with URI pools
Howdy, I'm trying to take our working jsessionid iRule and add a twist. We'd like for requests with a .seam URI to go to one pool, while all other requests go to a different pool (the motivation here...
Wes_98712
Nimbostratus
Mar 21, 2007First off I would highly suggest you get away from handling cookie persistence in the dynamic fashion that you are doing with Irules, the cookie hash function handles it much better, believe me, I had a very extensive JSESSIONID iRule that performed almost the exact same thing, but failed on more than one occassion when the server took a dive. So, what I would suggest is that you use a cookie hash persistence profile, set it to expire with the same timeout value as your deployment descriptors state within the web.xml, or application.xml.
Once that is in place, take out the UIE persistence and simply rely on the URI inspection, which is working for you.
The issue is that you are referencing multiple pools in your URI which most likely contain different application servers, with different JSESSIONID entropy, so what you need to do is create the hash profile.
However, this still will not solve your other issue in which if you send a request to a different pool, you loose persistance, if you are using the same servers in the other pool as the original pool (how many times can I say pool?) the hash cookie profile will work, if not, there is no way to handle this because each container (e.g. Tomcat etc) has it's own unique entropy used to generate the SessionID, and when a client comes in with an unreferenceable ID, it treats it as a stale ID, and generates a new one.
Course, you could try to setup the Hash cookie profile (referencing the JSESSIONID as the cookie) and match across pools, that may help to resolve the problem, but again, only if you are using the same servers in the same pool.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
