chunking causing latency in iRule?
Hey guys, I have an iRule I'm testing that is inspecting some xml for a missing field and making a pool decision based on that. It is causing some latency when I apply it... 2 seconds when it is applied vs ~10ms without it. I couldn't find any issues with the logic in the iRule (except the fact that it seems to work with HTTP::collect length set to any setting which I find odd... notice below I drilled it all the way down to '1' and it still works?!). Anyway, I'm using curl and doing a POST as a test and I decided to try http 1.0 out of curiosity to see if maybe chunking was causing the latency issue. The response is almost immediate response with http 1.0. Does it sound right that chunking would add that much latency for iRule processing? I know it has to store the chunked data and wait to process it but 2 seconds seems like a really long time for it to do that (at least to me).
I've tried this on 10.2.4 and 11.6.0 with the same results. Thanks for the help in advance. Here's the iRule:
when HTTP_REQUEST {
if { [HTTP::method] eq "POST" }{
HTTP::collect 1
}
}
when HTTP_REQUEST_DATA {
if { [HTTP::payload] contains "" }
{
pool Pool_1
log local0.info "Serial Number is Missing. Client IP = [IP::client_addr]"
} else {
pool Pool_2
}
}