Forum Discussion
Scope and integrity of local variables
- Oct 20, 2023
Toni1 As long as it is considered part of the same client connection you should be fine for both of these. Again, I have never had an instance where a variable for one user was unintentionally used by a different user. When the iRule initiates for that users connection any variables should be set so I don't think you have to worry about responses not having the variable.
Hi there,
That's good to know that realistically I probably don't have much to worry about... it's quite a big and important iRule, so i'm being a bit paranoid I suppose...
I guess my general lack of understanding is whether :
- There can be simultaneous requests/responses occuring for the same tcp connection (I read that http/2 might do that, but I wasn't sure), and if it is, could the local variables even in the same iRule event (given they are scoped to each connection) ever be in danger of being overwritten by other requests/responses from the same connection?
- And lastly is it technically possible to have a response without a request? I remembered that we make small use of websockets, so i'm wondering if a response that doesn't know about a local variable that was definately set in the beginning of the request might be due to websocket traffic instead of normal http traffic.
Thanks 🙂
Toni
Toni1 As long as it is considered part of the same client connection you should be fine for both of these. Again, I have never had an instance where a variable for one user was unintentionally used by a different user. When the iRule initiates for that users connection any variables should be set so I don't think you have to worry about responses not having the variable.
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