Forum Discussion
Irwin_Fletcher_
Nimbostratus
Jul 26, 2007URI Session ID based persistence issue
I’ve come across a need for persistence based off a session ID imbedded in a URI, and unfortunately, I can not get it to work.
Here’s the lowdown – I need to persist users based upon a sessi...
Deb_Allen_18
Jul 28, 2007Historic F5 Account
I've also had difficulty persisting across objects with the "persist" command, and I'm in the process of updating the documentation with some helpful detail.
In the meantime, you can try using the "session" command instead to enforce the persistence you need regardless of virtual/pool association:
when RULE_INIT {
set ::fletchtimeout 600
}
when HTTP_REQUEST {
set fletchpersist [findstr [HTTP::uri] "(X(1)S(" 7 ")"]
log local0. "fletchpersistvalue is >$fletchpersist<"
if {$fletchpersist != "" }{
set server [session lookup uie $fletchpersist]
if {$server != "" }{
directly select the desired server as stored in the session table
log local0. "server found: $server"
node [getfield $server : 1] [getfield $server : 2]
}
} else {
log local0. "No fletchpersist value found. Load balancing connection."
pool fletch_mobiletest_0
}
}
when LB_SELECTED {
add server info to session table when server selected
session add uie $fletchpersist [LB::server addr]:[LB::server port] $::fletchtimeout
}
when LB_FAILED {
detach and choose a new server if the selected server fails to respond.
new session entry will be written in LB_SELECTED on each attempt
LB::detach
LB::reselect
}HTH
/deb
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
