Forum Discussion
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