Forum Discussion
Session persistence - reading application set cookie
We have out-sourced some developers who have written an application in their development load balanced environment however I do not think they use F5.
Now the application has been deployed to our pre-production environment and it doesn't work. This is related to the fact that after a form submission, the app sends an HTTP 302 which has the effect of starting a new session, the request hits another web server in the pool and the app breaks. We have cookie persistence and source address affinity configured for the vip.
Now the developers are adamant that our LTM should be able to read the cookie that is set by the application so that it ensures the sessions remain on the correct servers.
In the 302 the following cookie is set:
Set-Cookie: AUTHTOKEN=jl0fvjb5xrnj40l4qybi55lh; path=/; secure; HttpOnly
However I am not aware of any way that the LTM can interpret this in order to direct traffic to the appropriate server.
We've asked the developers to go back and re-code the application but given their reluctance to do so and time constraints in releasing the product I think an F5 solution would be quicker.
Any advice would be greatly appreciated.
Thanks
Lee
- nathe
Cirrocumulus
Lee, - Lee_Sutcliffe
Nacreous
Thanks Nathan that looks like just the thing I'm after. - Lee_Sutcliffe
Nacreous
I've added the following iRule (there is existing code which directs traffic to different pools depending on the uri. To keep things simple I've removed these parts of the code) - nathe
Cirrocumulus
Lee, - Lee_Sutcliffe
Nacreous
Hi Nathan, - nathe
Cirrocumulus
Lee - nitass
Employee
Cookie: AUTHTOKEN=5tl25i4mbghhwz5sruhqcc2ji think it should be set-cookie rather than just cookie since persist add uie is in HTTP_RESPONSE event. - nathe
Cirrocumulus
Lee - Lee_Sutcliffe
Nacreous
Hi, sorry for my late reply, it's been one of those days! - Lee_Sutcliffe
Nacreous
I've re-enabled all 6 servers in the pool and tried the following irule, copied from Hoolio's post in https://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/39/aft/33490/showtab/groupforums/Default.aspx
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