Forum Discussion
anujl_5566
Nov 02, 2011Nimbostratus
Persistence Cookie iRule not working as desired
when HTTP_REQUEST {
if { [HTTP::path] equals "/api/v1/sendpinonceoff" } {
HTTP::path /sendpinonceoff
pool MM-MEPD
persist none
}
if { [HTTP::path] equals "/api/v1/verifyp...
Kurt_Knochner_5
Nov 03, 2011Cirrus
To add persist cookie command in the iRule I need to add a default cookie profile on Virtual server.
Not necessarily. You can use "persist cookie" only for those URLs.
This starts the chaos. After adding default profile I will have to add "persist none" for all urls in this current irule..correct?
Not necessarily. See above.
Then for the other 2, I can have the default persistence profile take care of the persistence as they will use same pool to server api call. This is the background.
Let's do it the other way round. Just use "persist cookie insert xxxxx" for those api urls.
That "should" work, UNLESS the client uses HTTP 1.1. The reason: persistency works for TCP connections. If a client uses HTTP 1.1 it might use the same TCP connection for several HTTP requests. In your example: one request to the new api, which will be persisted and another request to something, which will be persisted as well, as it's the same TCP connection. In that case a ONECONNECT profile might help, as that will de-multiplex the client request. However I'm not sure if persistency will be handled appropriately with ONECONNECT. Please try that.
Regards
Kurt Knochner
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