Forum Discussion
TNY_122436
Nimbostratus
May 08, 2014iRule redirects causing pool member issues
Hi everyone, I have an iRule that works accordingly to what it was intended to do. The problem is that when the VIP which contains this irule shows the VIP (Green) up when the pool members are actual...
Kevin_Stewart
Employee
May 08, 2014I 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
}
}
}
}
}
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
