Forum Discussion
disable irule process for the request not for the whole tcp connection
- Jul 26, 2015
Understood this topic is discussing some race conditions applied on iRule http events;
client 1 --> http request1 --> F5 --> http request1 --> server client 1 --> http request2 --> F5 --> http request2 --> server client 1 --> http request3 --> F5 --> http request3 --> server client 1 <-- http request1 <-- F5 <-- http response1 <-- server client 1 <-- http request2 <-- F5 <-- http response2 <-- server client 1 <-- http request3 <-- F5 <-- http response3 <-- server
From LTM perspective, LTM will not process the subsequent request (but rather put it on the request queue instead)until first response is back from backend pool memeber.
Even pipelining is enabled on client side and multiple requests come in at same time, LTM will still serialize them and process them according to the sequence (FIFO).
So in our case, variable has been set in request 1 will not be messed up even request 2 comes in earlier than response 1.
The iRule sample I gave above should add a sequence number to a variable name so that each outstanding http request has its own values. That way if you have 3 outstanding http requests you would have 3 variables: var.1, var.2, var.3. The value for var.1 is for the 1st request. When request1 response comes back, the code should use that variable. Then set var.1 to the values of var.2, set var.2 to the value of var.3 and set the value of $seq to 2, so that now you have var.1 and var.2 because you now only have two outstanding http request.
They introduced HTTP pipelining, a process where a single TCP connection can have multiple HTTP request send without having to wait for a response. But the responses must be sent in the same order of the requests. Read: https://en.wikipedia.org/wiki/HTTP_pipelining
However, I still think I'm missing something. You seem to only care about the 1st http request on a TCP connection. That is, where I have multiple variables (one for each request) only care about the 1st http request on a TCP connection. You do realize that a HTTP session can span multiple TCP connections and so each TCP connection will have its own unique "first HTTP request." So if a HTTP session say has 20 unique TCP connections, you will have "20 first http requests."
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com