Forum Discussion
lorndzo
Nimbostratus
Oct 04, 2012Http 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
- nitass
Employee
is server1.com and server2.com another virtual server? if so, is setting http fallback on server1.com and server2.com helpful? - lorndzo
Nimbostratus
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.
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