Forum Discussion
Chris_13067
Nimbostratus
Oct 29, 2008persistence based on text in payload
Hi,
I have an app that initiates a TCP connection to a server, which performs a login function, and returns a text string to be used as a session ID. The initial connection is then clos...
Chris_13067
Nimbostratus
Nov 11, 2008Thanks,
Here's what I have so far:
when CLIENT_ACCEPTED {
log local0. "Buildup -- collecting client data"
TCP::collect 60 0
set server_hold 0
}
when SERVER_CONNECTED {
log local0. "Buildup -- collecting server data"
TCP::collect 60 0
set server_hold 1
}
when CLIENT_DATA {
set CliSessionId [string range [TCP::payload] 22 53]
log local0. "Clisession ID is $CliSessionId"
if {[string is alnum $CliSessionId] == 1} {
log local0. "This is an existing connection"
persist uie $CliSessionId
event disable all
}
elseif {$server_hold == 1} {
log local0. "This is a new Session - passthrough"
}
TCP::release
}
when SERVER_DATA {
set SvrSessionId [string range [TCP::payload] 22 53]
log local0. "Svrsession ID is $SvrSessionId"
persist add uie $SvrSessionId
TCP::release
event disable all
}
I can see in the log that it's working as I would expect except new TCP sessions referencing the session id are just load balanced between multiple servers - they do not persist to the previous server.
I'm sure this is something basic that I've missed, maybe how I applied the iRule? Or am I not using the persist command correctly?
I tried applying the iRule directly to the virtual server with persistence set to 'None', and I tried to create a new persistence profile referencing the iRule (based on universal), but it still doesn't work.
Any help would be appreciated.
Thanks.
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