Forum Discussion
George_Watkins_
May 19, 2012Historic F5 Account
Keith,
You cannot nest events in iRules: LB_FAILED cannot reside inside of HTTP_REQUEST. Your iRule will probably look something like this:
when HTTP_REQUEST {
HTTP::header insert "X_CLIENT_IP" [IP::client_addr]
HTTP::header insert "X-Forwarded-For" [IP::client_addr]
if { [string tolower [HTTP::uri]] contains "pmcserver" } {
pool pm3_qa_pmcserver
} elseif { [string tolower [HTTP::uri]] starts_with "/partner" } {
pool pm3_qa_soap
} else {
pool pm3_qa_web
}
}
when LB_FAILED {
HTTP::redirect "http://mysite.com/over-limit.html"
}
The LB_FAILED event will be triggered the instant that a new connection attempt is made to a pool whose connection limit has already been reached. There are a number of different circumstances that trigger LB_FAILED event and they all have different criteria for load balancing failure. Hope that helps,
-George