Forum Discussion
Sheila_Liu_8576
Nimbostratus
Aug 18, 2006How to add delay when activating a pool member
trying to write an irule for a pool with two pool members, both members runs database but one is active, the other is inactive.
when the active one goes down, would need to wait 5-10 minutes to b...
JRahm
Admin
Aug 18, 2006The best place for a requirement like that is in iControl. A possible iRule solution could be handled by measuring the time of failure on server one, then checking to make sure 5 minutes has passed, then up server two and reset the failure variable back to 0. You need to be on a 9.2 version, and someone else might post back on a better event to place the checking other than CLIENT_DATA. I usually only use the HTTP events, so I'm unclear what's best for not HTTP traffic.
when CLIENT_CONNECTED {
set failure 0
set time_failed 0
}
when CLIENT_DATA {
if { $failure } {
if { [clock seconds] > [expr { $time_failed + 300 }] } {
LB::up pool yourPool member 2ndServer yourPort
set failure 0
}
}
}
when LB_FAILED {
set failure 1
LB::down pool yourPool member [LB::server addr] yourPort
set time_failed [clock seconds]
}This is untested! It might not work, but maybe it will get the wheels turning for you...
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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