I have a customer that wishes to send larger queries to a different pool. He’s noticed the difference between queries can be decided by header length. He wants an iRule that picks up another pool if the header length is over 50k.
I’ve tried a couple of different iRules pulled from here and amended to no avail. I haven’t specified them as I’m looking for a fresh take on the problem.
If the client sets a content-length header in the request you could check that with [HTTP::header Content-Length]:
when HTTP_REQUEST {
Check if client is sending more than 500 bytes
if { [HTTP::header Content-Length] > 500 }{
Select big_pool
pool big_pool
} else {
pool my_default_pool
}
}