Forum Discussion
Rick_110395
Nimbostratus
Sep 29, 2011Persistence in an iRule
I have a virtual server with cookie persistence applied to the virtual
server and and iRule that has cookie persistence applied in each
condition. Since cookie persistence is applied to the virtual server
can I remove the "persist cookie" statements from the iRule. See config
below:
virtual virt-web-srv {
destination 10.10.50.33:http
ip protocol tcp
rules web-irule
persist cookie
profiles {
http {}
tcp {}
}
}
rule web-irule {
when HTTP_REQUEST {
set uri [HTTP::uri]
if {$uri contains "/prodweb"or $uri contains "/prodapp"} {
persist cookie
pool prod-web-pool
} elseif {$uri contains "/devweb" or $uri contains "/devapp"} {
persist cookie
pool dev-web-pool
} elseif {$uri contains "/testweb" or $uri contains "/testapp"} {
persist cookie
pool test-web-pool
} else {
HTTP::respond 404
}
}
}
2 Replies
- Michael_Yates
Nimbostratus
Hi Rick,
Yes. If the cookie persistence is configured on the Virtual Server then you can remove the "persist cookie" statements from your iRule.
The BIG-IP will issue a cookie for each of the pools utilized by default when cookie persistence is configured on the Virtual Server.
Hope this helps. - Rick_110395
Nimbostratus
Thanks. That does help, a lot!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
