Forum Discussion
OTS02
Nov 29, 2011Cirrus
universal persistence using jsessionid
Have Universal persistence set up and use this irule:
when HTTP_RESPONSE {
if { [HTTP::cookie exists "JSESSIONID"] } {
persist add uie [HTTP::cookie "JSESSIONID"]
lo...
nitass
Jan 05, 2012Employee
if there is no jessionID, will the fallback persistence profile then be used?i do not think so.
[root@ve1023:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
fallback persist source_addr
destination 172.28.19.79:80
ip protocol 6
persist myuniversal
profiles {
http {}
tcp {}
}
}
[root@ve1023:Active] config b pool foo list
pool foo {
members 200.200.200.101:80 {}
}
[root@ve1023:Active] config b profile myuniversal list
profile persist myuniversal {
defaults from universal
mode universal
rule myrule
}
[root@ve1023:Active] config b rule myrule list
rule myrule {
when HTTP_RESPONSE {
if { [HTTP::cookie "JSESSIONID"] ne ""} {
persist add uie [HTTP::cookie "JSESSIONID"]
log local0. "[IP::client_addr] Clairmail persistence HTTP_Response. Cookies: [HTTP::header values Cookie]"
}
}
when HTTP_REQUEST {
if { [HTTP::cookie "JSESSIONID"] ne ""} {
persist uie [HTTP::cookie "JSESSIONID"]
log local0. "[IP::client_addr] Clairmail HttpRequest. Set-Cookies: [HTTP::header values Cookie]"
}
}
}
Case1 JSESSIONID is existing
[root@ve1023:Active] config b persist
No Persistence Table Entries were found.
[root@ve1023:Active] config curl -I http://172.28.19.79
HTTP/1.1 200 OK
Date: Thu, 05 Jan 2012 05:59:15 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Fri, 11 Nov 2011 14:48:14 GMT
ETag: "4183e4-3e-9c564780"
Accept-Ranges: bytes
Content-Length: 62
Set-Cookie: JSESSIONID=99713BB629EB4F07EE7CD75259A5E4B1; path=/
Content-Type: text/html; charset=UTF-8
[root@ve1023:Active] config b persist
PERSISTENT CONNECTIONS
Type Virtual Node
universal 172.28.19.79:80 200.200.200.101:80
Case2 JSESSIONID is not existing
[root@ve1023:Active] config b persist
No Persistence Table Entries were found.
[root@ve1023:Active] config curl -I http://172.28.19.79
HTTP/1.1 200 OK
Date: Thu, 05 Jan 2012 05:59:48 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Fri, 11 Nov 2011 14:48:14 GMT
ETag: "4183e4-3e-9c564780"
Accept-Ranges: bytes
Content-Length: 62
Content-Type: text/html; charset=UTF-8
[root@ve1023:Active] config b persist
No Persistence Table Entries were found.
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