Forum Discussion
Persistence iRule
Connections to a pool should use a non secure cookie persistence profile which I have created, unless they come from a specific list of IP addresses which need to use source address persistence
when CLIENT_ACCEPTED
{ if { [class match [IP::client_addr] equals addressrange] } { pool SF-ECRPROD persist source_addr}
else { pool SF-ECRPROD persist ? } }
How do I assign a specific persistence profile in the iRule?
- nag_54823
Cirrostratus
Hi Kevinmc,
If you want to use cookie insert persistence method , you can use below
persist cookie insert "cookiename" expirationtime
- kevinmc
Altocumulus
thanks nag. How do I specify if it is a secure or unsecure cookie? This virtual server is doing SSL offload so needs to use unsecure cookie
Hi KevinMC,
I would recommend to use a Cookie-based persistence profile (including your desired settings) as the default profile on your Virtual Server and then use an iRule to overwrite this setting for just specific SRC-IPs...
when CLIENT_ACCEPTED { if { [class match [IP::client_addr] equals addressrange] } then { persist source_addr } else { Do nothing and keep the default persistence profile for this connection } pool SF-ECRPROD }
Cheers, Kai
Recent Discussions
Related Content
* 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