Forum Discussion
lanceleroux_533
Nimbostratus
Sep 04, 2008JSessionID URI Persist
I have created an IRULE to do URI JSessionID balancing for the application only (/mosAppWar)
So far our server and LTM logs indicate that this is not being respected.
...
lanceleroux_533
Nimbostratus
Sep 05, 2008Some of the entries in the table were showing uri instead of jsessionid. I think that is because of the the application doesn't use jsessionids. I have improved the code to keep the LTM from adding the bad entries to the table.
Below is my code at this point. I have a tester looking into it now to see if it is working.
when HTTP_REQUEST {
if { [HTTP::uri] contains "/mosAppWar" }{
Make jsess equal the jsessionid
set jsess [findstr [HTTP::uri] "jsessionid" 11 "."]
Make sure that jsessionid is actually there since some requests don't have one.
if {[HTTP::uri] matches_regex {jsessionid} } {
Make sure jsessionid is not blank before adding it to the UIE.
if { $jsess ne "" } {
Commit the record to the LTM database for 5400 seconds.
persist uie $jsess 5400
}
}
Since it is /mosAppWar send the host to the application pool.
pool CIBC_Express_Application_Pool
log local0. "QA2 Server: [LB::server addr] jsessionid $jsess Query: [HTTP::uri][HTTP::query]"
log local0. "URI: [HTTP::uri][HTTP::query]"
return
Send all other requests to the static pool.
} else {
pool CIBC_Express_Static_Pool
return
}
}
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