Forum Discussion
IheartF5_45022
Apr 16, 2014Nacreous
Just 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 }
}
}
}