Forum Discussion
Juha__Ranta_106
Nimbostratus
May 10, 2005Any way to keep some values over different connections; how about fail-over?
Hi,
I need to maintain some iRule variable values over different connections.
I have managed to do this using Tcl global variables and now I would like to know more about ...
unRuleY_95363
May 11, 2005Historic F5 Account
Q1 : what is the difference between different session command 'modes' ?
This simply specifies the type of the "key". Different modes treat the key differently. For example, srcaddr and destaddr treat the key as an IP address use it to index into the session table differently than UIE which treats the key simply as a string.
Q2 : what is the default value for 'timeout', what if no 'timeout' parameter is given?
The default turns out to be the value of the default persist setting on the virtual or 180 if none is present on the virtual.
Q3 : how can i replace the value of existing key in 'session' table?
session add will do a replace if it already exists.
Q4 : Is it somehow possible to mirror these 'session' values between 'Active' and 'Standby' unit?
No, not currently though we have an open CR to add this functionality.
Q5 : And one more about Tcl 'global' variables. Is it somehow possible to define 'rule global' variables. Thus variables that would maintain their values between different connections but would be visible only within one iRule? (I would not like to pollute Tcl runtime with global variables)
You could always declare your own namespace for these variables. For example, if your rule was called "MyRule", then you could simply name all your global variables MyRule::myVar. This would not prevent access from other rules, but it would help keep from polluting the namespace (for example, if two rules both wanted to use a global variable called myVar).
I thought I had an example of replacing a session entry somewhere on this site...
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
