Forum Discussion
William_Wright_
Nimbostratus
20 years agoBasic cookie session iRule
I need to create a basic iRule that keeps persistence based on JSESSION and load balances accordingly otherwise. I have tried all the standard persistence methods but it always goes back to defaulting...
Colin_Walker_12
20 years agoHistoric F5 Account
This should be pretty straight forward. There are literally hundreds of examples of this sort of thing in the forums if you look around a little. It's always best to use the search function or even just browse around to see if there are answers to the questions you have, as many people are working on or have worked on similar rules that can help each other with their experience.
In any event, it would look like this:
when HTTP_REQUEST {
set jsess [findstr [HTTP::uri] "jsessionid" 11 ";"]
if { $jsess != "" } {
persist uie $jsess
} else {
pool yourPool
}
}hth,
-Colin
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