Forum Discussion
peter_cuenco_73
Nimbostratus
Jun 21, 2006Persistence within iRules
Hi,
I'm a newbie with iRules, but have a need for the following scenario -
VIP (my.company.com) is defined with cookie persistence. The VIP uses an iRule that basically reads -
when HTTP_REQUEST {
if { [string toupper [HTTP::uri]] contains "/Pool1/" } {
pool Resources
} elseif { [string toupper [HTTP::uri]] contains "/RESOURCES/" } {
pool Resources
} else {
pool my.company.com
}
}
I need to have sessions destined for /Pool1/ or /Resources/ be sticky, ie, once a user gets to server1 in the pool for /Resources/, the same server1 needs to be used for /Pool1/ requests as well.
Is there a way to this?
Thanks!
- peter_cuenco_73
Nimbostratus
Thanks. I'm checking other posts regarding cookie persistence and changing headers. - Deb_Allen_18Historic F5 AccountYou should be able to enforce persistence outside the rule by creating a persistence profile of type "cookie" using cookie insert mode and applying it to the virtual server: Click here
- Deb_Allen_18Historic F5 Account(Edited previous post to remove warning about OneConnect, it works fine with cookie persistence now...)
- JRahm
Admin
and by now you mean what versions? 9.1.x / 9.2.x ?? Thanks. Good timing on this thread, I'm about to test oneconnect with cookie insert. - Deb_Allen_18Historic F5 AccountI'm glad you asked. I've been doing some poking around on a similar question & have a few more details:
- JRahm
Admin
THanks for the feedback. We begin adding apps to our testing next week, so I'll watch out for this behavior. We haven't used oneconnect yet. - JRahm
Admin
- hoolio
Cirrostratus
Hey citizen, - JRahm
Admin
so as long as I am only inserting one cookie per virtual, I'm ok without oneconnect? - hoolio
Cirrostratus
Hey citizen, I just saw your question upon looking at this post again.
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