Forum Discussion
Irineu_Costato_
Aug 02, 2010Historic F5 Account
Cookie Persistence
Hi Folks,
I need to create an irule using cookie persistence, I create this below, is it work ? I don´t have how to try now.
when HTTP_REQUEST {
if {[HTTP::cookie ]} {
use pool PoolA
}
if {[HTTP::cookie ]} {
use pool PoolB
}
else { use pool PoolC }
}
I would like that the client that already has a cookie called PoolA go to pool PoolA, the same for PoolB and new clients goes to PoolC.
Thanks
6 Replies
- Chris_Miller
Altostratus
You need to specify the name of the cookie...something like this:
when HTTP_REQUEST { if { HTTP::cookie exists "PoolA" } { pool PoolA } } - hoolio
Cirrostratus
How would someone get a cookie for poolA or poolB if they never get load balanced there? Wouldn't you want some logic that selects the poolA or poolB for new clients as well?
Aaron - Irineu_Costato_Historic F5 AccountThanks Chris, I will try.
Irineu - Irineu_Costato_Historic F5 AccountAaron,
The clients that already get this load balance before has a cookie, cookie PoolA or cookie PoolB, the new clients, with no cookie, go to the other pool (PoolC). Is that right ? - hoolio
Cirrostratus
If the clients are all going through this iRule, they'd never get load balanced to pool A or B though. They'd only ever get to pool C, unless the members of pool C set a cookie for pool A and/or B.
Aaron - Chris_Miller
Altostratus
Posted By hoolio on 08/10/2010 03:44 AM
If the clients are all going through this iRule, they'd never get load balanced to pool A or B though. They'd only ever get to pool C, unless the members of pool C set a cookie for pool A and/or B.
Aaron
I imagine that's the case...but we'll have to wait for his reply. I have a similar model where Pool C would contain all the servers in Pools A and B...if the chosen server was in Pool A, I'd want them to come directly to Pool A next time, etc.
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