Forum Discussion
Cookie stickiness doesn't work
Howdy, We're trying to set up stickiness with cookies. What we've done:
1.Added new cookie under persistence, current settings:
- Set cookie stickiness in virtual server
When I do a curl request
curl -v -X POST --cookie 'username=test' -u "test:test" * About to connect() to testweb port 8083 (0) * Trying 192.168.9.30... * Connected to testweb (192.168.9.30) port 8083 (0) * Server auth using Basic with user 'test'
POST /monitor HTTP/1.1 Authorization: Basic dGVzdDp0ZXN0Cg== User-Agent: curl/7.29.0 Host: testweb:8083 Accept: / Cookie: username=test
< HTTP/1.1 200 OK < Server: Apache-Coyote/1.1 < Content-Type: application/json < Transfer-Encoding: chunked < Date: Wed, 23 Aug 2017 05:57:23 GMT < * Connection 0 to host testweb left intact
In the logs, on web servers, I see that F5 does RR without stickiness.
All recommendations are appreciated. Thanks
- Stanislas_Piro2
Cumulonimbus
Hi,
cookie rewrite persistence will rewrite server response cookie named "username" with it's value containing pool member information...
you can use this irule to configure Universal persistence with cookie value:
when HTTP_RESPONSE { if { [HTTP::cookie exists "Username"] } { persist add uie [HTTP::cookie "Username"] 3600 } } when HTTP_REQUEST { if { [HTTP::cookie exists "Username"] } { persist uie [HTTP::cookie "Username"] 3600 } }
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