I am trying to setup an irule to redirect traffic with the uri “/genlogin” to separate ports on the same node, 7003 and 7013. They redirects are working fine…however when we disable the 7003 service it will still try to redirect to the down pool member. It looks like i need to try to setup a health check on the node before the redirect takes place. Problem is i have no idea how to do it. Any help will be appreciated.
VIP: asgenqa:80 Pool: asgen-qa Members: xxx.xxx.xxx.xxx:7003 xxx.xxx.xxx.xxx:7013
Irule:
when CLIENT_ACCEPTED {
set count [expr { rand() }]
}
when HTTP_REQUEST {
if { [HTTP::uri] equals "/genlogin" } {
if { $count < .5 } {
HTTP::redirect "http://asgen-qa:7003/fa_sc/domain"
} else {
HTTP::redirect "http://asgen-qa:7013/fa_sc/domain"
}
}
elseif { [HTTP::uri] equals "/" } {
set count [expr { rand() }]
if { $count < .5 } {
HTTP::redirect "http://asgen-qa:7008/FA_Portal"
} else {
HTTP::redirect "http://asgen-qa:7018/FA_Portal"
}
}
}