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 pool... so I don't want to re-roll the dice every time you jump between abc & xyz.
What's the best approach? It seems like cookie insert is adequate -- I'll have one cookie for each pool and both will be offered by the browser since it's a single web site. Is it that simple? I feel like there's got to be some wrinkle waiting to bite me...
Thanks - Al
- hoolio
Cirrostratus
Hi Al,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]" } } }
- spark_86682Historic F5 AccountA cookie insert profile will give out cookies per-pool if you use the default cookie name, so you shouldn't need an iRule in this case. Since both pools are on the same hostname, the clients should send both cookies to the BIG-IP. I don't see any reason why it wouldn't Just Work. This all assumes independent server selection for the two pools is OK (i.e. clients can have a different server for /abc than they do for /xyz).
- adharkrader
Nimbostratus
So, an iRule on event HTTP::request to send them to the correct pool but the cookie insert in the persistence profile will keep them straight within each pool, correct? - hoolio
Cirrostratus
It is that simple. LTM will check the persistence profile after HTTP_REQUEST is triggered and then look for the persistence cookie for the currently selected pool. The client may have a persistence cookie from both pools, but only the one for the selected pool will be used for that request.
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