Forum Discussion
ChrisK
Nimbostratus
Dec 01, 2009iRule Question - persistance
I have a question regarding irules.
First off, is it possible to add persistence to a pool via a Virtual Server iRule?
Also, if so, how would this be accomplished? I’m still new with iRules.
Essentially what I am after is: in the old version 4 BigIPs, you could enable persistence on the pools, but now you can only via the VS (virtual server). We have a VS with an iRule which determines which pool to use, and 1 of the pools we would like to have persistence enabled. Can this be done by editing/enabling persistence for that pool in the iRule?
The type of persistence I would like to add is “Active HTTP Cookie Method: insert”.
If you could point me in the right direction that would be very appreciated.
- hoolio
Cirrostratus
Hi CK,when HTTP_REQUEST { Check requested path if {[HTTP::path] ends_with ".wav"}{ Use cookie persistence (session - no timeout) for this request persist cookie insert my_persist_cookie 0 } else { Use no persistence for this request persist none } }
- The_Bhattman
Nimbostratus
Also check out http://devcentral.f5.com/wiki/default.aspx/iRules/persist.html for information about persist. - ChrisK
Nimbostratus
hi guys, - hoolio
Cirrostratus
You'll need to add a blank cookie insert persistence profile to the VIP. The iRule then enables and configures or disables the cookie persistence profile according to your required logic.
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