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 'session' commands:
Q1 : what is the difference between different session command 'modes' ?
mode := simple|sticky|uie|universal|...
Q2 : what is the default value for 'timeout', what if no 'timeout' parameter is given?
Q3 : how can i replace the value of existing key in 'session' table?
Q4 : Is it somehow possible to mirror these 'session' values between 'Active' and 'Standby' unit?
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)
-----
I tried to store some information between different connections using command
session add uie $mykey $myvalue $timeout
(mykey = string value, myvalue = string value, timeout = 3600)
and later retrieve these same value using
set storedvalue [session lookup uie $mykey]
... well, ...
I managed to retrieve the value previously stored value (on separate connection) but I was unable to replace the existing value.
I also tried to do 'session delete uie $mykey' before adding new values (under the same key) but that did not work either.
----
SEE ALSO:
1. Subject: Any way to keep same valuable over different connections?
http://devcentral.f5.com/default.aspx?tabid=28&view=topic&forumid=5&postid=1674 Click here
2. Subject: Concurrent connection limit
http://devcentral.f5.com/default.aspx?tabid=28&view=topic&forumid=5&postid=1990 Click here
----
Thanks in advance
- juha -
- unRuleY_95363Historic F5 AccountQ1 : what is the difference between different session command 'modes' ?
- unRuleY_95363Historic F5 AccountCR40920
- qqdixf5_74186
Nimbostratus
We are on v10. I would like to create a namespace and declare some variables under it. So something like this: - spark_86682Historic F5 AccountYou would do this via the namespace command, but it is disabled in iRules, so there's no way to do it. You could do something like "myNameSpace_myVar" instead.
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