Forum Discussion
One-Way Persistence records problem
Had to do some more research because I started to remember some "weirdness" when I wrote my first iRule using persist uie dealing with timeout.
When you do a persist add with a timeout the persist record will be deleted after that number of seconds unless the timeout is "refreshed."
The timeout will be refreshed only if you do another "persist add" or just a plain "persists". A "persist lookup" will not refresh the timeout. Since the cookie will NOT exist on any response other than the 1st one, you have to refresh the persist record in HTTP_REQUEST. This is why the sample iRule use just plain "persist", this will look up to see if a record exists and if it does it resets the timeout to what you have coded.
So in your "new" iRule, 315 seconds after the 1st request comes in the persist record will be deleted, because you never refresh the timeout. You need to have just plain "persist" in HTTP_REQUEST, if the cookie JSESSIONID exists.
However my other notes about the time out still applies. If there is more than 315 seconds between users requests, then the persist record will be deleted and then next request will be re-load balanced.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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