Forum Discussion
Quick question about persistence...
This is F5 101, but I am not sure how to fix it. So when you look at persistence I get a little confused sometimes. If I want to migrate traffic off a node, my thought was you create a cookie with a timeout say 2 hours and add it to the virtual hosts you want. Then say you want to take a node out of a pool, you would click on disable in the node settings. But then it says only persistent or active connections. But so if I have a 2 hour cookie I am going to remain pegged to that server until after 2 hours of inactivity right? So then how do you migrate traffic off in the middle of the day. If you force a node off line then you would get a broken session if you have a cookie for that server right? So what do people do say mid day to patch a server and not cause anyone to have a broken session? Or do you have to force the cookie with timeout and wait until the next day when all those cookies have expired and nobody is on there anymore? Thanks Joe
5 Replies
- afedden_1985
Cirrus
I beleive the cookie Expiration parameter is how long the cookie is good for not the amount of idle time. Help in 11.2 says the Expiration time Specifies the expiration time of the cookie. so if you set it for 2 hours and disable the server after 2 hours no one should be using that server.
- sundogbrew
Altocumulus
afedden, I have tested the cookie timeout and what I found is when you go to the server you get a cookie with say 2 hour timeout, every time you go back to the server that cookie gets reset so it only expires if you haven't gone back to the server in 2 hours then you get reload balanced. But if you are working away you will always have a 2 hour cookie. Joe
- afedden_1985
Cirrus
Well I learned something today, Thanks. in this old 2005 article they talk about the same thing you are working on: https://devcentral.f5.com/questions/expire-persistence-cookie
BIG-IP sets persistence cookie on every response. So, if you set expiration time of X minutes on it, it will expire after X minutes of inactivity. Persistence cookies get new lifetime equal to the expiration time on every response.
you could use Forced Offline instead of disable to only allow active connections.
- Christopher_Boo
Cirrostratus
Every situation is different, but in my experience, if I disable a node, then come back in an hour, there are either no or very few connections. Do you have any idea what the average user session time is? Is there a least active time of day you could do the patches? For my primary ecom app there is very little activity in the early morning. I can disable a node and have no connections in just a few minutes during that time.
Chris
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