Forum Discussion
Bruce_Hampton_1
Nimbostratus
19 years ago1 VIP < Multiple pools
I have a fun little situation where I am terminating SSL, parsing the URI and picking a pool. Easy enuf... but now is where I could use a little help *grin*
I want to be able to switch back and forth between the pools at will ( based on URI ) and have 2 separate persistence cookies to keep me on the chosen member.
I can switch pools just fine, and I can persist just fine during the first time in to each pool. The challenge comes in when I go from pool_HTTP_Online to pool_PrintLastYear back to pool_HTTP_Online. The cookie is present but doest not appear to be honored.
Any help would be appreciated.
=====================================================
rule irule_persist_Multiple_Pools {
when HTTP_REQUEST {
if {[HTTP::uri] contains "s_online_2004"} {
persist cookie insert LastYear 31622400
pool pool_PrintLastYear
}
else {
persist cookie insert TAOL 31622400
pool pool_HTTP_Online
}
}
}
virtual VIP_Online_CLEAR {
destination 172.16.1.10:http
ip protocol tcp
profile oneconnect pf_http_Online tcp
persist pf_OL_05_Final
pool pool_HTTP_Online
rule irule_persist_Multiple_Pools
}
11 Replies
- StephanManthey
Nacreous
I used the following iRule to "hide" the default cookie naming convention used by the cookie insert profile and to encrypt/decrypt the cookies:
when HTTP_REQUEST {
HTTP::cookie decrypt cookie_abc secretabc
HTTP::cookie decrypt cookie_def secretdef
if {[HTTP::uri] starts_with "/abc/"}{
persist cookie insert cookie_abc 0
pool pool_abc
}
else {
persist cookie insert cookie_def 0
pool pool_def
}
}
when HTTP_RESPONSE {
HTTP::cookie encrypt cookie_abc secretabc
HTTP::cookie encrypt cookie_def secretdef
}
With a timeout of "0" I tried to force a session cookie behaviour. But unfortunately the standard timeout of 180 seconds is applied. (Tested in 10.1.0 LTM VE Trial)
Any ideas how to fix this?
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