Forum Discussion
msullivan_61147
Nimbostratus
Apr 07, 2010Remove persistence for downtime site
I need some help with persistence for our sites.
We are using Weblogic as our app server, so we want to set persistence on a JSESSIONID in a cookie.
I created the following iRule...
hoolio
Cirrostratus
Apr 09, 2010Nice one Ian. You could also use LB::server priority to determine whether the currently selected member is a normal member or one just used during outages:
when HTTP_REQUEST {
Add a persistence record if the client presents a Java cookie with a value
if { [HTTP::cookie "JSESSIONID"] ne "" } {
persist add uie [HTTP::cookie "JSESSIONID"] 3600
}
}
when LB_SELECTED {
Track whether to add a persistence record in the response
set add_persist 1
Check if the current selected server is less than the main pool members' priority
if { [LB::server priority] < 30 } {
Don't add a persistence record in the response
set add_persist 0
Delete the persistence record
if { [HTTP::cookie "JSESSIONID"] ne "" } {
persist delete uie [HTTP::cookie "JSESSIONID"]
}
}
}
when HTTP_RESPONSE {
if { [HTTP::cookie "JSESSIONID"] ne "" and $add_persist} {
persist add uie [HTTP::cookie "JSESSIONID"] 3600
}
}
Aaron
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
