Ryan_Crowley_18
May 18, 2009Nimbostratus
How to cause a failover to another server when a error string is present in a response?
Ok,
totally new to writing iRules here, so bear with me through a couple stupid questions.
My situation is that i am using ColdFusion (and JRun) as an application server. Sometimes (frequently) JRun crashes, and displays an error message, which does not have the proper header information of a 500 error, or what ever.. it sends a 200.
So what I need to do is look at each response that comes back from the server, if i detect the string "JRun closed connection." or "Server Error", then retry the request on another server in the pool.
My problem is currently that I am not sure what I'm looking for here. It seems that the event I need is HTTP_RESPONSE_DATA or HTTP_RESPONSE and looking at HTML::payload but.. I keep going through the documentation and being that I'm new to both iRules and TCL, I'm never sure of which I'm looking for an F5 thing or a TCL thing. ya know?
If someone could point me to either an example or at least in the right direction I'd greatly appreciate it!