Forum Discussion
jay_41157
Nimbostratus
Nov 14, 2008cookie persistence across services
HI
Is it possible to use cookie persistence across services ?
I have 1.1.1.1:80
and 1.1.1.1:443
virtual servers, and need them to use same cookie ...
StephanManthey
Nacreous
Oct 07, 2013I´m a bit late with my response, sorry. This approach worked fine for me in v11:
when HTTP_REQUEST {
if {[HTTP::cookie exists BIGipServer[getfield [LB::server pool] "/" 3]]} {
eval [LB::select]
node [LB::server addr] [TCP::local_port]
} else {
pool [LB::server pool]
}
}
If you have i.e. 2 virtual servers (listening on port 80 and port 8080 and map them to a pool with members on port 0) the cookie will always force the incoming requests to the destination port which is encoded into the cookie value. By using the 'eval' command you can figure out the proper poolmember. But you will use the address information only and apply the initial client destination port for selecting the poolmember via node command.
The iRule above will be bound to both / all relevant virtual servers.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
