Forum Discussion
Jim_Bo
Nimbostratus
Apr 15, 2014HTTP::cookie, SWITCH and multiple identical pools
Hello Everyone, I must load balance a suite of applications across four nearly identical pools using a single virtual server; pool_a thru pool_d. The application team wants to distinguish between...
IheartF5_45022
Nacreous
Apr 16, 2014Just apply a persistence cookie profile to your virtual
Then the iRule would be;-
when HTTP_REQUEST {
foreach ck [HTTP::cookie names] {
if {$ck starts_with "BIGipServer"} {
Select pool based on part of cookie name
pool [substr $ck 11]
Drop out of event - F5 will choose appropriate pool member based on cookie
return
}
}
switch -glob [string tolower [HTTP::path]] {
"/pool_a*" {
HTTP::path "/"
pool "pool_a" }
"/pool_b*" {
HTTP::path "/"
pool "pool_b" }
"/pool_c*" {
HTTP::path "/"
pool "pool_c" }
"/pool_d*" {
HTTP::path "/"
pool "pool_d" }
default { reject }
}
}
}
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