Forum Discussion
C_D_18583
Nimbostratus
Oct 25, 2005Adding persistance profiles to pools using Irules
I have 2 persistance profiles that I need to apply
to individual pools namely jupiter_60mins and earth_30mins.
Since I cannot apply the persistance profiles at the pool level
How do I re-write this irule below to incorporate these profiles to the pools ?
Sample :
if { [HTTP::host] starts_with "nexus"} {
if {$uri starts_with "/jupiter/"} {
pool robocop-1
}
elseif {$uri starts_with "/earth/"} {
pool robocop-2
}
}
- Brian_Gupta_115
Nimbostratus
Assuming you set $uri elsewhere, try:when HTTP_REQUEST { if {[HTTP::host] starts_with "nexus"} { if {$uri starts_with "/jupiter/"} { PROFILE::persist timeout 3600 pool robocop-1 } elseif {$uri starts_with "/earth/"} { PROFILE::persist timeout 1800 pool robocop-2 } } }
- sniklfriz_12810
Nimbostratus
I'm trying to do a similar function, I want to apply persistance to one pool and not the other. This rule is accepted for proper syntax but it did not work in inital testing. I still need to dig into it. I'm not sure if this is actually a valid rule. - JRahm
Admin
Add logging statements to make sure you are getting the results you anticipate. Try findclass instead of matchclass since you are using the starts_with operand - sniklfriz_12810
Nimbostratus
Thanks for the input. After testing today, things are not quite working right. Every other connection attempt to the VIP using that rule causes the server in the proxy pool to generate an error (I have each pool down to using a single server). For those requests that are failing the BIG-IP is generating these error messages. - unRuleY_95363Historic F5 AccountAlso, don't forget you can also use "persist none" to disable persist to a particular pool (assuming you have the persistence configured with a profile on the virtual).
- zafer
Nimbostratus
Hi,
can i use "persist none" command in content switch irule for disable persistence when i use another irule for jsessionid persistence (i don't use persistence profile)
- JRahm
Admin
Yes, if you include a conditional on when you want to persist and when you don't, this should work fine. You can see an example here: https://devcentral.f5.com/s/articles/weblogic-persistence-done-right
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