Forum Discussion
Terry_Luedtke_1
Nimbostratus
Sep 08, 2009Persistence by pool rather than VIP?
Hi,
Is it possible to set persistence by pool rather than by VIP? For example, if we had an iRule like the following:
when HTTP_REQUEST {
switch [HTTP::path] {
"*.jpg" -
"*.gif" -
"*.png" { pool image_pool }
"*.asp" { pool dynamic_pool }
default { pool web_pool }
}
}
How would we set connections to the dynamic pool to be persistent, but connections to the image and web pools run free? I'm experimenting with setting up two VIPS and using "virtual dynamic_vip" to forward to another VIP with persistence turned on, though that seems overly complicated.
- Terry Luedtke
- The_Bhattman
Nimbostratus
Hi Terry,when HTTP_REQUEST { switch -glob [HTTP::path] { "*.jpg" - "*.gif" - "*.png" { pool image_pool persist none } "*.asp" { pool dynamic_pool persist source_addr 255.255.255.255 30 } default { pool web_pool persist none } } }
- hoolio
Cirrostratus
Minor suggestions: if you want to use wildcards with switch, you need to use the -glob flag. And if it's an IIS based app, the objects aren't case sensitive. So you could set the path to lower case: - Terry_Luedtke_1
Nimbostratus
Thanks, the persist command took care of it. I had seen that command, but got the impression it would obliterate any existing persistence associated with the VIP (and therefore the dynamic pool). - hoolio
Cirrostratus
Hi Terry,
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