Forum Discussion
atomicdog_7107
Mar 08, 2012Nimbostratus
Priority Group activation and preempt
Hey guys,
I have a few pools set up just for redundancy purposes with a preferred primary server... so 2 pool members with Priority Group Activation set to fail at "Less than 1 available m...
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
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