Rob_Wotton_8024
Oct 20, 2009Nimbostratus
Pool redirection and healthcheck
Hi,
I have been banging my head against the wall for the past couple of days with this one, so any help would be greatly appreciated.
We need to redirect certain URL's to a specific pool, however, we would also like to include a health check against that pool and the pool is down use a different pool.
Below is my attempt at the rule, but as you can probably tell it doesn’t work. Can anyone offer some help?
Many thanks
Rob
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
if {{ $uri starts_with "/sitea " } and {[active_members webpool-1]}}
{
pool webpool-1
}
elseif { $uri starts_with "/site1" }
{
pool webpool-2
}
elseif {{ $uri starts_with "/siteb" } and {[active_members webpool-1]}}
{
pool webpool-1
}
elseif { $uri starts_with "/siteb" }
{
pool webpool-2
}
else {
if {[active_members defaultpool-1]} {
pool defaultpool-1
}
else {
pool defaultpool-2
}
}
}