Forum Discussion
Eric_Grepps_264
Oct 13, 2006Nimbostratus
I am having the same issue, except I am redirecting many applications across many virtual servers.
Would it be safe to apply the same logic by using the following code or is there a more effecient way to handle showing a page when the pool members are down?
when RULE_INIT {
set down_response "
}
when HTTP_REQUEST {
switch [getfield [string tolower [HTTP::uri]] "/" 2] {
app1 {
if { [active_members p1] < 1 } {
HTTP::respond $down_response
} else {
pool p1
}
app2 {
if { [active_members p2] < 1 } {
HTTP::respond $down_response
} else {
pool p2
}
...
appN {
if { [active_members pN] < 1 } {
HTTP::respond $down_response
} else {
pool p1
}
default { pool p_default }
}
}