Forum Discussion
Valentine_96813
Jan 30, 2012Nimbostratus
Forcing Priority Group Usage
When I was searching though priority group posts, I founf a refernce someone made to an iRule that will force incoming connections back from the secondary server when the primaries come back up. Here...
Baron_of_Strath
Mar 20, 2014Historic F5 Account
I have just created this and tested. It is not the cleanest of code but it does work reliably. Perhaps someone with a better programming know-how can tweak it.
when CLIENT_ACCEPTED { backup node Requires the IP Address - Couldn't find a variable for the lower priority node ip set backup_node "172.29.2.95" interval is in milliseconds 60 is very aggressive set interval 60 min is a minimum number of servers to be in the pool while allowing connection to this object. set min 1 set DEBUG 1
scan [LB::select] %s%s%s%s%d command current_pool command2 current_member current_port
eval [LB::select]
if { $DEBUG equals 1 } {log local0. "Pool Member Selected $current_member"}
Start Conditional if { $current_member equals $backup_node } {
after $interval -periodic {
if { [active_members $current_pool] > $min } {
if { $DEBUG equals 1 } {log local0. "Resetting connection"}
TCP::close
}
else
{
log local0. "Number of active members in $current_pool [active_members $current_pool]"
}
}
}
else { log local0. "Sent to primary node $current_member"}
Close Conditional - only run when connected to backup Send user to the selected member - This will ALWAYS be the one active priority group member pool $current_pool
}
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