Forum Discussion
Chris_Miller
Altostratus
Apr 26, 2010Best Way to do Cookie Persistence here?
I have one VIP and 5 "pools" that can service the VIP. Each pool is made up of 3 clustered servers so pool persistence is required, but not server persistence within the pool.
So, if a user hits our ...
Michael_Yates
Nimbostratus
Apr 26, 2010You could seperate the traffic to each pool of servers based on the content type or by the request in the URI:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/content1" } {
pool pool.for.content1
}
elseif {[string tolower [HTTP::uri]] starts_with "/content2" } {
pool pool.for.content2
}
elseif {[string tolower [HTTP::uri]] starts_with "/content3" } {
pool pool.for.content3
}
elseif {[string tolower [HTTP::uri]] starts_with "/content4" } {
pool pool.for.content4
}
elseif {[string tolower [HTTP::uri]] starts_with "/content5" } {
pool pool.for.content5
}
Choose a Default Action none of the above content is matched
Most often a redirect to a different site, or a redirect to a url that
would be matched by this iRule
else {
HTTP::redirect http://[getfield [HTTP::host] ":" 1]/content1
}
}
Once seperated into each Pool, I'm not sure that you would need to go any further than a custom F5 Cookie Setting to do the rest. These are the possible settings:
Cookie Hash: Specifies that the server provides the cookie, which the system then maps consistently to a specific node.
HTTP Cookie Insert: Specifies that the system inserts server information, in the form of a cookie, into the header of the server response. This is the default setting.
HTTP Cookie Passive: Specifies that the server provides the cookie, formatted with the correct server information and timeout.
HTTP Cookie Rewrite: Specifies that the system intercepts the BIGipCookie header, sent from the server, and overwrites the name and value of that cookie.
Hope this helps.
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