Forum Discussion
Kevin_Stewart
May 08, 2014Employee
I believe this is a known condition because you're assigning pools within the iRule. If you just need the VIP to show red, perhaps to trigger a GTM monitor, then you'd probably need to use an iCall or user_alert.conf script to manage VIP viability.
If, however, you just need to make sure you're not load balancing to downed pools, something like the following may help (a minor modification of your iRule):
when HTTP_REQUEST {
if { not ( [HTTP::host] starts_with "www.") } {
HTTP::redirect https://www.[getfield [HTTP::host] ":" 1][HTTP::uri]
} elseif { ( [HTTP::uri] starts_with "/ChaptOne/Page1/Blue/" ) and ( [HTTP::uri] contains "/HAPPY" ) and not ( ( [HTTP::uri] contains "/ABC" ) or ( [HTTP::uri] contains "/CDE" ) ) } {
HTTP::respond 301 location "https://www.mainpage.com/chapter4"
} else {
switch -glob [HTTP::uri] {
"/MyRx*" -
"/Monday*" -
"/Tuesday*" -
"/Wednesday" -
"/Thursday*" {
if { [active_members Unix_pool] < 1 } {
...do something here... (splash maintenance page?)
} else {
pool Unix_pool
}
}
default {
if { [active_members Windows_pool] < 1 } {
...do something here... (Splash maintenance page?)
} else {
pool Windows_pool
}
}
}
}
}