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 bring up the inactive member.
Is there a timer/delay function in irule to do this?
Thanks.
- JRahm
Admin
The 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] }
- Sheila_Liu_8576
Nimbostratus
thanks for your posting, the traffic is tcp 1526, so the events should work.
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