lorndzo
Oct 04, 2012Nimbostratus
Http Redirect + Load Balance + failover
I am using a simple iRule that I found from one of the gurus here at dev centeral. It works great until a node fails. When a node fails the page displays or fails every other time which make sense. Is it possible to dectect a failover and redirect to the available server? Any help would be great. Programing is not my strong point.
when CLIENT_ACCEPTED {
set count 0 }
when HTTP_REQUEST {
switch $count {
0 {
HTTP::redirect http://server1.com
set count 1
}
1 {
HTTP::redirect http://server2.com
set count 0
}
}
}