danielo303_1961
Feb 17, 2012Nimbostratus
iRule: redirect to pool based on app response time?
I would like to use an iRule to direct traffic based on the response time of the back-end resource pool. Under normal operations, incoming requests (these are SOAP-based queries) will go to the primary resource pool. When the primary pool becomes unresponsive (response slower than 5-10 seconds), requests should be directed to a secondary pool which is configured to basically tell the client "come back later".
I am using priority groups and health monitors to approximate this mechanism currently. But I think if I could find the right tools in iRule I would have more precise control.
Basically I need something like:
when HTTP_REQUEST {
[code to check response time here...]
if response_time < 10 {
pool primary_pool
return
}
else {
pool secondary_pool
return
}
}
Is there a command to test the back-end response? We are on BIG-IP 9.4.3
Thanks!