Forum Discussion
Chris_13067
Nov 11, 2008Nimbostratus
Thanks,
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.