Forum Discussion
Rob_Reece_12096
Nimbostratus
Mar 26, 2013clearing cookie on persisted sessions when pool member is down
Hi-
I am writing an iRule to detect a server crash - which I am defining as anytime a request gets a 500+ error code. On this event, I'd like to try other pool members before allowing the error to return the user's browser. I found this post which is basically what I would like to do - but that post is several years old. One thing I have going for me that should make all this easier is that we are actually a software vendor and I am trying to demonstrate roughly how a customer could use our product in a highly available environment. My script will never be used in production, just a simple demo where I can control things easily. So this thing doesn't need to be bullet proof.
What I am seeing from BIG IP is that if I kill a server, the health monitor picks that fact up and marks the pool member down. This is what I expect. On the next request from a session that was persisted to the failed node, BIG IP selects the other node automatically (again this makes sense). However, my application is stateful and recovering that state requires that I clear a cookie. It is possible that I can handle the situation more gracefully in my application, but I am curious if there is a way in the LB_SELECTED event to tell that a different node has been selected than what was used on previous requests. If I can detect this situation, I could clear the cookie and my app would probably be pretty happy then.
It seems one possibility is to capture any existing persistence in HTTP_REQUEST and then in LB_SELECTED I could check if some other node is selected.
Or maybe in HTTP_REQUEST I could just check the status of the pool member for any existing persistence and remove the persistence if the member is down?
1 Reply
- Laudec_55181
Altostratus
The pool configuration (under advanced) has "Action on Service Down", with an option to reselect. LTM will choose another pool member if one is available and rebind the client connection to a new serverside flow.
Now, what I am not sure about, is what this would do to persistent connections, especially cookies. Might be worth an experiment maybe? If it works gracefully, then no need for iRules then.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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