Forum Discussion

lorndzo's avatar
lorndzo
Icon for Nimbostratus rankNimbostratus
Oct 04, 2012

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

 

}

 

}

 

}

 

 

2 Replies

  • is server1.com and server2.com another virtual server? if so, is setting http fallback on server1.com and server2.com helpful?

     

     

    sol6510: BIG-IP system fallback host behavior when a host is down

     

    http://support.f5.com/kb/en-us/solutions/public/6000/500/sol6510.html
  • The 2 servers are LDAP servers (credential collectors). They authenticate the user then pass it on to a webserver. The webserver only knows DNS names not IPs. I set up a standard http vip. Problem is after the user hits the F5 you are SNAT'ed and the LDAP server sends you to a Login screen not the web page which is not acceptable to the user.

     

     

    The HTTP redirect was set up so the user is redirected directly to the LDAP server instead of going through the F5. This way the DNS name is what the webserver expects. I am not sure fallback will help but I can try.

     

     

    Thanks for your input.