Forum Discussion

Corey_Smith_174's avatar
Icon for Nimbostratus rankNimbostratus
Jan 13, 2011

refresh persistence for long-lived connections

We have long-lived connections that we need to re-route to the same server if they reconnect within a 10 minute window. Example irule:






set persistkey ""


TCP::collect 1








if { [regexp "(\x01)56=(\[^\x01\]+)\x01" [TCP::payload] match d source] } {


set persistkey $source


take the route if it exists


create a temporary persistence record that expires quickly


persist uie $persistkey 10










if { $persistkey != "" } {


(re)create the persistence record


persist uie $persistkey 600








This doesn't work as the persistent entry is not (re)created on SERVER_CLOSED




Another way of asking the question: Is there a way to refresh persistence records throughout the life of a TCP socket rather than just at the beginning?




Testing seems to reveal that the only non-HTTP event "persist add uie" actually creates records in is LB_SELECTED




Is there a way to create the persistence record at the end of the connection rather than the beginning?



1 Reply

  • I'm not sure. Maybe you could use the table command in 10.1 to handle the persistence manually.