Forum Discussion
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:
when CLIENT_ACCEPTED {
set persistkey ""
TCP::collect 1
}
when CLIENT_DATA {
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
}
}
when SERVER_CLOSED {
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?
- hoolio
Cirrostratus
I'm not sure. Maybe you could use the table command in 10.1 to handle the persistence manually.
Recent Discussions
Related Content
* 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