Forum Discussion
Cookie persistence with LTM Policies
Hi For our two JBOSS applications we have configured VS with policy:
ltm policy /Common/POLICY_LTM {
controls { forwarding }
requires { http }
rules {
POOL1 {
actions {
0 {
forward
select
pool /Common/POOL1
}
}
conditions {
0 {
http-host
case-sensitive
values { pool1.domain }
}
}
ordinal 1
}
POOL2 {
actions {
0 {
forward
select
pool /Common/POOL2
}
}
conditions {
0 {
http-host
case-sensitive
values { pool2.domain }
}
}
ordinal 2
}
}
strategy /Common/first-match
}
Also we have set universal persistence with iRule:
when HTTP_REQUEST {
if { [HTTP::cookie "JSESSIONID"] ne "" } {
persist uie [HTTP::cookie "JSESSIONID"]
}
}
when HTTP_RESPONSE {
if { ([HTTP::cookie "JSESSIONID"] ne "") and ([HTTP::cookie "JSESSIONID"] ne "\"\"") } {
persist add uie [HTTP::cookie "JSESSIONID"]
}
}
We observed, that when we open this two application in Tabs, there is a conflict between cookie form servers. becouse there is one domain, when we open first app, servers set-cookie JSESSIONID, and it's OK. When we open second app in new tab, servers from second pool, create new oen JSESSIONID, and second application work correctly, but first application generate new JSESSIONID.
How to resolve this issue on F5 LTM ?
Regards Tom
2 Replies
- Arnaud_Lemaire
Employee
Hello, are cookie set by servers defined with a domain name or a host name ?
- Tom_185829
Nimbostratus
Hi In JSESSIONID cookie, we use only options : Path and HttpOnly. In response header we sent Location header. For example:
< HTTP/1.1 200 OK < Set-Cookie: JSESSIONID=Voz+60BDgr4uuhoO3z9BF4KJ; Path=/app; HttpOnly < Content-Type: text/html;charset=UTF-8 < Content-Length: 7196 < Date: Thu, 23 Jun 2016 07:55:19 GMT < Connection: close < Server: ServerI don't know you mean it, wrote cookie set with domain or host name. Regards
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
