Forum Discussion
Chris_Scales_10
Nimbostratus
May 27, 2008irule cookie persistence using query parameter
Hello,
I'm new to iRules and TCL in general and need a bit of help.
I'd like to use F5LTM cookie insert persistence profile to select the server to send the user's request to based on a F5LTM issued cookie.
Due to an application bug, there are two instances where the the F5LTM cookie will be not be sent in the Cookie HTTP headers, but instead it will be sent as a query parameter.
This is unavoidable, and it happens in two cases:
(1) the application does not send Cookies for file uploads
(2) requests for contents are send to a different domain, and cookies cannot span different domains.
For these two cases, we plan to add the cookie as a query parameter to the URL. This query parameter we'll be called "lcb", unless you want to use a different name. We will need to create an irule to extract the cookie from the query parameter and use it to select a server.
Here are the conditions to consider:
(1) If the F5LTM Cookie is present, then F5LTM will use cookie affinity to select the server and will send the cookie to the server.
(2) If the F5LTM Cookie is not present and the URL is domain1.com/adc/upload or domain2.com, then execute the irule and extract the lcb query parameter and thus select the server to send the request to.
If the lcb parameter is not present, then create a new cookie and select a server.
Any help would be appreciated.
- hoolio
Cirrostratus
It sounds like you want to configure a cookie insert persistence profile (probably with no timeout to use a session cookie). The BIG-IP would insert a session cookie in the response to the client whenever the client doesn't include the persistence cookie in that request.
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