Forum Discussion
Persistence IRule Logic
for the below Irule , i tried to understand its logic , but after i understood i feel it has something wrong :
- SSHSSH_97332Nimbostratus
Irule Cookie_IP_Persist { when HTTP_RESPONSE { set SessionId [HTTP::cookie ASP.NET_SessionId]:[IP::client_addr] if { [HTTP::cookie ASP.NET_SessionId] != "" }{ persist add uie $SessionId 1800 } } when HTTP_REQUEST { set SessionId [HTTP::cookie ASP.NET_SessionId]:[IP::client_addr] if { [HTTP::cookie ASP.NET_SessionId] != "" }{ persist uie $SessionId 1800 } } }
- What_Lies_Bene1CirrostratusI'm not sure why you'd want to configure persistence for both the REQUEST and RESPONSE events?
- SSHSSH_97332NimbostratusYou got my point , i found it like that on many posts & want to understand it , below are examples :
- SSHSSH_97332NimbostratusSo why it is persisting on request & response at the above Posts ?
- What_Lies_Bene1CirrostratusI'm not sure but that's certainly what's suggested in all the posts. I think it has something to do with minimising persistence records but can't be sure. Anyone else?
- hooleylistCirrostratus
With 'persist add' in HTTP_RESPONSE, you're saying you want to manually add a persistence record after the load balancing has already been done with the given token for X seconds. On the request, you're saying you want to look up an existing persistence record using the same token as the key. If a persistence record already exists, its timeout will be updated. If there isn't one, a new record will be added.
- SSHSSH_97332NimbostratusThanks Steve & Aaron .
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