someguy
Mar 06, 2014Nimbostratus
How can I return content directly from an irule and skip LB/server interaction?
I'm trying to return a pre-defined html page directly from an F5 without hitting backend servers (DC health-check). I have come up with the below irule, but it appears to work about half of the time, the other half it hits the pool and generates a 404. Seems like this should be simple, what am I doing wrong?
when HTTP_REQUEST {
if {[HTTP::uri] equals "/ping.html" }
{
set object [class lookup "ping" "ping_objects"]
HTTP::respond 200 content $object noserver Cache-Control No-Cache Pragma No-Cache
event disable all
return
}
}