Forum Discussion
GaryZ_31658
Sep 13, 2007Historic F5 Account
Persist on BIG-IP Session Cookie first else use use Server Cookie to select Pool
I am hoping to use a server cookie to select a pool based on matching data in the cookie. I would like to then use a BIG-IP Session Cookie to persist normally. Is there a better way to handle this? Will BIG-IP know what pool to use based on the session cookie? (The server cookie will contain site"x" along with other data and the TTL will be indefinite.)
The goal is to allow us to define which users get the updated site by defining them in the group new_site_users and still maintain persistence once they get there. We also want to trap users that are transacting with either the new site or the old site so they don't switch if we update the new_site_user list while they are transacting.
when HTTP_REQUEST {
if {[HTTP::cookie exists "bigip_cookie"]{
persist my_defined_cookie-persist_profile
}
elseif {[HTTP::cookie exists "server_cookie"]}{
if { [matchclass [HTTP::cookie value "server_cookie"] contains $::new_site_users] } {
pool new_site_pool
}
else {
pool original_site_pool
}
}
}
Data Group new_site_users
siteA
siteB
siteC
- Deb_Allen_18Historic F5 AccountI'd apply a cookie insert persistence profile to the virtual server, using the default cookie name [BIGipServer].
Rule:class new_site_users { siteA siteB siteC }
when HTTP_REQUEST { first look for LTM persistence cookie & extract pool name set myPool [findstr [HTTP::cookie names] "BIGipServer" 11 " "] if {$myPool != "" }{ pool $myPool } elseif {[HTTP::cookie exists "server_set_cookie"] && \ [matchclass [HTTP::cookie "server_cookie"] contains $::new_site_users]}{ pool new_site_pool } else { pool original_site_pool } }
- GaryZ_31658Historic F5 AccountThanks Deb,
- Gregory_Gerard_
Nimbostratus
Hi, Deb,
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