How many HTTP request can access IRules? If more than 1 HTTP request
can access a set of IRules associated with a VS, then do they have their own set of variables or do they share a static variable? “… own set of variables…” meaning each HTTP request variable X can be any value at any point in time. “… share a static variable…” meaning each HTTP request will share 1 variable X value and if it changes then it changes for ALL.
ex) If 2 HTTP request access IRules at the same time and manipulates X variable.
1) HTTP Request 1 changes variable X to “1” in HTTP REQUEST EVENT.
2) Then HTTP Request 2 changes variable X to “2” in HTTP REQUEST EVENT.
3) HTTP Request 2 uses variable X in the HTTP RESPONSE EVENT.
If you have an iRule enabled with code in an HTTP_REQUEST event, the HTTP_REQUEST event will be triggered on each HTTP request. Local variables created or updated at any point during a client’s connection to the virtual server will still be available until the connection is closed.
Clients can pipeline requests with HTTP so that request one and request two are sent before a reply comes back for the first request. I’m not sure how TMM handles that. By default, pipelining is enabled on the HTTP profile. But I think OneConnect does not support pipelining.
Trx: for ‘normal’ variables set in iRules (as opposed to static::, globals, tables or data groups), they are scoped locally per connection. A connection hits the VIP, then instantiates the iRule and the variables are uniquely scoped to that flow. So connection 1 will only ever see connection 1’s variables; ditto connection 2…
In that way an iRule is almost like an “object” that is born when the rule is executed. Without being explicitly global, variables are local.