Forum Discussion
Kenny_Van_73892
Nimbostratus
May 11, 2007Different persistence each pool under a single virtual server
I'm hitting the wall with persistence in version 9.4. In version 4.6, I can set different persistence for each pool such as SSL persistence for pool A, Simple persistence for pool B, and None for pool C. All pool A, B, and C are under a single VIP. Now I can't do the same thing thru configuration in version 9.4. The Tech @ F5 recommended me to config the persistence for each pool thru irule and I'm not sure how to start with. For instance, https://www.mycompany.com/A go to poolA, /B go to poolB, /C go to poolC and poolA is a Simple persistence, poolB is a SSL persistence, and poolC is None.
when HTTP_REQUEST {
if {[HTTP::uri] contains "A"} {
pool A
}
elseif {[HTTP::uri] contains "B"} {
pool B
}
else {
pool C
}
}
The Persistence feature in Profile is configured for all pools, so I can't utilize it and need your help to config persistence for each pool.
Thanks.
- hoolio
Cirrostratus
You can use the 'persist' command in each condition of the rule to use a different persistence method. Here is a related post (Click here) - Kenny_Van_73892
Nimbostratus
Thanks for the response. I looked over the persist command but got confused that can I embed the persist command within HTTP_REQUEST event or I have to create a new event CLIENTSSL_HANDSHAKE? For intstance: - hoolio
Cirrostratus
You should be able to set the different persistence methods in the HTTP_REQUEST event. This allows you to make per-HTTP request decisions on which persistence method to use. - Kenny_Van_73892
Nimbostratus
Thanks Aaron. - Kenny_Van_73892
Nimbostratus
Here's another one that I just came up with but not sure if it has the right logical order or syntax. - hoolio
Cirrostratus
That second version looks better. Can you add some log statements to check the results and then test? - Kenny_Van_73892
Nimbostratus
I got command is not valid @ - hoolio
Cirrostratus
Can you change the lookup from ssl to uie? - Kenny_Van_73892
Nimbostratus
I changed from ssl to uie, but the irule editor is still complaining: command is not valid in current event context (CLIENT_ACCEPTED)[SSL::sessionid] - G__Wesley_RoberHistoric F5 AccountI think you need to choose a valid event for the [SSL::sessionid] command. http://devcentral.f5.com/wiki/default.aspx/iRules/SSL__sessionid.html
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