iRules OneConnect and variable scope...Hrm.
Could be I'm just not doing something right here. But consider the following:
iRule:
when CLIENT_ACCEPTED {
set seqA 0
incr seqA
log local0. "SEQ-1: $seqA - SEQ-2 (not initalized yet)"
}
when HTTP_REQUEST {
set seqB 0
incr seqA
incr seqB
log local0. "SEQ-1: $seqA - SEQ-2: $seqB"
}
when HTTP_RESPONSE {
incr seqA
incr seqB
log local0. "SEQ-1: $seqA - SEQ-2: $seqB"
}
-- end of rule --
Now in a OneConnect operation, where the same TCP connection is being re-used, but mutiple backend clients are out there making requests.. say in the case of a farm of web browsers behind a proxy -- that seqA number just keeps going and going and going until the actual TCP connection is torn down. It's NOT created for every new HTTP event, correct? And SeqB is reinitalized to "0" for every time HTTP_REQUEST is fired off?
So then, how can I transfer data between events (e.g. LB_SELECTED, HTTP_REQUEST, HTTP_RESPONSE) ? I need to shovel around some data found in a header between these 3 events - but in a OneConnect situation, it doesn't seem like it works very well - especially when there is LONG pauses between the HTTP_REQUEST and RESPONSE events (sometimes as many as 10 seconds).