Forum Discussion
adharkrader
Nimbostratus
Jul 17, 2009One VS, 2 pools, separate persistence?
Our primary web site is serving different content from two server farms... like www.foo.com/abc and www.foo.com/xyz. But there's SSO, forms, etc that require that you stay stuck to one server in each...
hoolio
Cirrostratus
Jul 17, 2009Hi Al,
If you use cookie insert persistence, you would want to specify the cookie name each time you select a pool. The cookie persistence will be specific to the pool used. Here is an untested example:
The persist wiki page has details on the perist command (Click here).
when HTTP_REQUEST {
log local0. "[IP::client_addr][TCP::client_port]: New HTTP request to [HTTP::host][HTTP::uri]"
Select pool and persistence based on URI
switch -glob [HTTP::uri] {
app1
"/abc*" {
Select abc pool and abc session cookie persistence
pool abc_pool
persist cookie insert abc_cookie 0
log local0. "[IP::client_addr][TCP::client_port]: abc request"
}
app2
"/xyz*" {
Select abc pool and abc session cookie persistence
pool xyz_pool
persist cookie insert xyz_cookie 0
log local0. "[IP::client_addr][TCP::client_port]: abc request"
}
default case
default {
take some default action?
log local0. "[IP::client_addr][TCP::client_port]: no match for [HTTP::host][HTTP::uri]"
}
}
}
Aaron
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