Forum Discussion
hooleylist
Dec 03, 2010Cirrostratus
Hi Joe,
I was hoping it might be a response with a 0 content length or a specific status code. If you could detect the failure just from the HTTP headers it would be a lot simpler. Do you think the only way to detect this issue is by checking the response payload?
If you have to check the response payload, it would be a bit more complicated. For the latter, I'm thinking you could use a stream filter based iRule to check for a bad response and down the pool member from that. I don't think you'd be able to "fix" the current response with a stream filter as the response isn't buffered. If you wanted to change LTM's handling of the current failed response, I think you'd need to collect the payload using HTTP::collect. However, collecting the payload would be a lot less efficient compared with a stream filter iRule. I'd be very wary of trying to collect every text or HTML response just to fix a relatively small percentage of bad responses.
If you think it would be enough to detect a current failure and disable the pool member for subsequent requests, I could try to come up with a quick example. Else, if you want to try collecting the payload, I could try that. Either way, you'll need to come up with a string or regex that is only seen in bad responses.
Aaron