Forum Discussion
kridsana_52318
Apr 24, 2015Nimbostratus
Cookie persist Fail with One Virtual server but have many pool (different member too)
Hi
I have issue with persistence cookie.
My environment is I have one Virtual server and this virtual server (domain) have many Application in different server. So we choosing pool via irule like...
nitass
Apr 24, 2015Employee
How Can I fix this? like store cookie for each pool (client have cookie_default for pool default and cookie_abc for pool abc so when he access www.domain.com and www.domain.com/abc , he won't lose session)
isn't it default behavior?
When you configure a cookie persistence profile to use the HTTP Cookie Insert or HTTP Cookie Rewrite method, the BIG-IP system inserts a cookie into the HTTP response, which well-behaved clients include in subsequent HTTP requests for the host name until the cookie expires. The cookie, by default, is named BIGipServer. The cookie is set to expire based on the time-out configured in the persistence profile. The cookie value contains the encoded IP address and port of the destination server.
sol6917: Overview of BIG-IP persistence cookie encoding
https://support.f5.com/kb/en-us/solutions/public/6000/900/sol6917.html configuration
root@(ve11c)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 172.28.24.10:80
ip-protocol tcp
mask 255.255.255.255
persist {
cookie {
default yes
}
}
profiles {
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 39
}
root@(ve11c)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
ltm rule qux {
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/agent*" { pool foo1 }
"/member*" { pool foo2 }
default { pool default }
}
}
}
test
[root@ve11c:Active:In Sync] config curl -I http://172.28.24.10/agent/something
HTTP/1.1 404 Not Found
Date: Fri, 24 Apr 2015 04:34:59 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Sun, 09 Feb 2014 08:39:51 GMT
ETag: "41879c-59-2a9c23c0"
Accept-Ranges: bytes
Content-Length: 89
Content-Type: text/html; charset=UTF-8
Set-Cookie: BIGipServerfoo1=1707657416.20480.0000; path=/
[root@ve11c:Active:In Sync] config curl -I http://172.28.24.10/member/something
HTTP/1.1 404 Not Found
Date: Fri, 24 Apr 2015 04:36:59 GMT
Server: Apache/2.2.3 (CentOS)
Content-Type: text/html; charset=iso-8859-1
Set-Cookie: BIGipServerfoo2=1875429576.20480.0000; path=/
[root@ve11c:Active:In Sync] config curl -I http://172.28.24.10/something
HTTP/1.1 404 Not Found
Date: Fri, 24 Apr 2015 04:35:11 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Sun, 09 Feb 2014 08:39:51 GMT
ETag: "41879c-59-2a9c23c0"
Accept-Ranges: bytes
Content-Length: 89
Content-Type: text/html; charset=UTF-8
Set-Cookie: BIGipServerdefault=1707657416.20480.0000; path=/
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