Forum Discussion
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).
2 Replies
- Mohamed_Lrhazi
Altocumulus
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 - Richard__HarlanHistoric F5 AccountIf I understand what you are looking for you need to put what you are looking for into a array. So I am guessing you want to match request X with response X. The first thing it has been a while since I have read the RFC but in a HTTP 1.1 connection request are answered in the same order they were received. Now oneconnect does not use HTTP 1.1 but it should still answer the requests in the order it was received. So the 5th response should be the answer for the 5th request.
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