Forum Discussion
ask_me_anytime_
Nimbostratus
Mar 16, 2009Cooikie JsessionID persistence and Cookie Hash Profile
hello,
I'm thinking of using Cookie Hash Profile of LTM instead of the below code.
has anybody ever used Cookie Hash Profile to replace a JsessionID persistence ??
any strange behavoir when you used the Cookie Hash Profile ??
thanks ..
below is the code.
rule WeblogicJSessionPersist {
when HTTP_REQUEST {
if { [HTTP::cookie exists "JSessionID"] } {
persist uie [HTTP::cookie "JSessionID"]
} else {
set jsess [findstr [HTTP::uri] "JSessionID" 11 ";"]
if { $jsess != "" } {
persist uie $jsess
}
}
}
when HTTP_RESPONSE {
if { [HTTP::cookie exists "JSessionID"] } {
persist add uie [HTTP::cookie "JSessionID"]
}
}
}
5 Replies
- James_Quinby_46Historic F5 AccountWill the application break for users if the jsessionid is not honored? The iRule listed above is written to capture jsessionid from either a cookie or the URI and create a persistence record (via UIE) from it.
- ask_me_anytime_
Nimbostratus
yes, with this irule, the application will break or the client connection will be forwarded to one of the pool members if the jsessionid is not honored.
I'm thinking of using cookie hash profile instead of that irule but I'm not sure LTM cookie hash profile can work in this case....
any suggestions ??? - James_Quinby_46Historic F5 AccountI'll confess that I've not ever used the cookie hash. Not recently, anyway. The jsessionid iRule works just fine. Even though it was originally written for WebLogic, I know it works very well with other java app servers (like tomcat, for example).
There is a commented/annotated version of the same iRule here:
http://devcentral.f5.com/wiki/default.aspx/iRules/Weblogic_JSessionID_Persistence.html
If you leave the logging lines uncommented, you can test this out and see how it works. This version also includes a few "string tolower" statements to normalize all the strings to lowercase, in the off chance that the app throws "JSESSIONID" out there while it's also doing "jsessionid". - ask_me_anytime_
Nimbostratus
hi,
thanks for the link.
I will use that irule and implement cookie hash profile and see if it gives the same results.- fgf_165674
Nimbostratus
Hi,
What was your result?
Did you get the same results?
Thank you
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
