Forum Discussion
hooleylist
Mar 09, 2012Cirrostratus
Is this for HTTP? If so, you could add the two servers to separate pools. You could then use an iRule to check in each HTTP_REQUEST event to see if the primary pool is up and select that. Else, if it's not, use the secondary pool. If both are down, you could take some failsafe action like send an HTTP response from the iRule or a redirect to some other URL.
The downside to this is you'd need two pools per virtual server. The upside is the iRule is much simpler than trying to modify the logic of priority groups.
when CLIENT_ACCEPTED {
Save the VS pool name and use it as the default
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
If the default pool is up, use it
if {[active_members $default_pool] == 0}{
If the secondary pool is up use it
if {[active_members secondary_pool]}{
pool secondary_pool
} else {
Take some action?
Redirect
HTTP::redirect "http://maintenance.example.com/down.html"
Send an HTTP response
HTTP::respond 503 content {Sorry we are down now}
}
}
}
Aaron