Alan_Sha
Sep 02, 2005Nimbostratus
How can I trigger a CLIENT_DATA event manually?
I have an iRule that breaks out the client transactions coming from TCP socket and forwards them to different servers based on the content of each request.
The TCP client is working in an asynchronous mode (i.e. the client has two threads, one for sending request, another one for receiving response from the same socket where the request is sent. Therefore, the client can send a whole bunch of requests at the same time without waiting on the response. ). Because it is impossible for iRule to open multiple server connections at the same time, I have to withhold the subsequent requests at the BIG IP while I am sending one request to the destination and waiting on the response. Once I get the response, a LB::detach is issued to release the server connection so that the next request can be re-load balanced.
The problem I am having right now is that because the requests are withheld at the BIG IP buffer, the CLIENT_DATA event (where the request is being analyzed and determined where to go.) will not be triggered immediately after the response is received and the server connection is detached.
For example, the TCP client sends two requests to BIG IP at the same time, BIG IP forwards one to the destination while keeping the other one in the buffer. When I receive the response and detach the server, the CLIENT_DATA event will not be triggered until almost 20 seconds later, which means the second request is waiting on the BIG IP for 20+ seconds later before it is being processed.
My question is: is there a way I can trigger a CLIENT_DATA event right away once the first request is completed? If no, what other ways I can use to delay the requests at the BIG IP?
Thanks