Forum Discussion
iRule for monitoring back-end server
Is there any iRule that can monitor the back-end server so if the back-end server is busy or dies, the pool member will be marked down?
So whenever back-end server is busy or dies, no more traffic will be sent to the pool member since it's marked down by the iRule.
So basically the two tasks of the iRule are monitoring the back-end servers and marking the pool member down.
Anybody has this similar experience or can anybody share how to create, a syntax probably?
Thanks.
3 Replies
- Hamish
Cirrocumulus
Well... Normally you'd use a monitor for this. But if you really really want an iRule to be intelligent enough (Or require the response time of a check NOW rather than the monitor timeout), you could craft the check yourself using a SIDEBAND connection.
Or you could trap the LB_FAILED event and reselect a new member and re-issue the request...
H - Tim_Armstrong_9
Nimbostratus
Hello Hamish,
Can you share how to accomplish this with monitor?
Thanks. - monitauress_634Historic F5 AccountHere is a great document on passive monitoring: http://lorimacvittie.sys-con.com/node/1483899/mobile, with an example at the end.
Here are a couple of simple iRules to get started:
Mark the pool member down if unable to connect to server:
rule server_down {
when LB_FAILED {
LB::down
}
}
Mark the pool member down upon a bad response from server:
rule bad_resp {
when HTTP_RESPONSE {
if { [HTTP::status] >= 500 } {
LB::down
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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