Forum Discussion
tom_kleinpeter_
Nimbostratus
Mar 14, 2006Cookie hash persistence
I'm trying to keep the same user accounts going to the same members of a pool, even if they are accessing our site from different browsers and at different times of day (possibly hours apart). From reading the docs, it seems like the easiest way to do this is for my web site to set a cookie that is unique to the user, and then use cookie hash persistence on the BigIP. From my understanding, the BigIP will hash an identical cookie into the same member everytime (assuming the pool of members has not changed). Does this sound like the right approach?
Assuming this isn't too far off track, I have a few questions about this approach:
I assume because this is a hash function that the BigIP is not maintaining any state, correct? (we have a very large number of users)
What happens if the member of the pool that a cookie is hashed to goes down?
What happens if the pool itself is changed (new member is added, for instance) -- is everyone rehashed into a possibly different node?
Finally, I just wanted to confirm that the flow of events could be like this if the user does not have a cookie:
1. User connects with no cookie, bigIP load balances the connection to node A
2. node A sets user cookie, possibly handles several HTTP queries during the connection
3. User disconnects
4. Everytime the user reconnects now, the BigIP looks at the cookie and sends the user to node B
Thanks!
- Deb_Allen_18Historic F5 Account
- tom_kleinpeter_
Nimbostratus
I apologize if this is the incorrect forum, but I may have to write an IRule if the built in support does not work for me. - Deb_Allen_18Historic F5 AccountYou are correct about the possibility of the hash not evaluating to the server which set the cookie. Passive cookie persistence overcomes this flaw by having each server deterministically set the appropriate cookie value, which will in turn be decoded reliably by BIG-IP to send persistent connections to the inital server on subsequent requests.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects