Forum Discussion
Gary_Bright_120
Nimbostratus
Mar 13, 2006Persist iRule based on URI
Hi there I'm trying to write an iRule that will allow us Admins the choice of selecting a pool member and have persistence with that member.
At the moment we have a persistance profile or source_a...
Gary_Bright_120
Nimbostratus
Mar 16, 2006Thanks for all your replys
I did some more testing today and have come up with some interesting finds
rather then specify a member in a pool I created 4 new pools each with one member and then rewrote the iRule to look like this
when HTTP_REQUEST {
if { [URI::decode [string tolower [HTTP::uri]]] contains "gb=" } {
persist none
log "Persist Turn Off"
}
if { [URI::decode [string tolower [HTTP::uri]]] contains "gb=4" } {
pool member_www_04 member 4.4.4.4 80
pool member_www_04
persist source_addr 1800
log "Persist Setup to Member 4"
}
if { [URI::decode [string tolower [HTTP::uri]]] contains "gb=3" } {
pool member_www_03 member 3.3.3.3 80
pool member_www_03
persist source_addr 1800
log "Persist Setup to Member 3"
}
if { [URI::decode [string tolower [HTTP::uri]]] contains "gb=2" } {
pool member_www_02 member 2.2.2.2 80
pool member_www_02
persist source_addr 1800
log "Persist Setup to Member 2"
}
if { [URI::decode [string tolower [HTTP::uri]]] contains "gb=1" } {
pool member_www_01 member 1.1.1.1 80
pool member_www_01
persist source_addr 1800
log "Persist Setup to Member 1"
}
}
This worked first time, using the Statistics page to view persistence records I saw them update and I then had my persistence to my specific webserver.
As soon as I change the line to specify a member in the pool (even thought there is only one) it stopped working.
Nothing in the logs,
Do you think this could be a bug?
TIA
Gary
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