Forum Discussion
Adrian_Turcu_10
Nimbostratus
Mar 06, 2009Would Pool Selection Override Persistent Rules
I have a VS that has a persistence profile applied to it, which sets a uie type persistence based on a particular header content. This VS also has an iRule where decisions based on URL are made so the client is sent to the correct pool.
It seems that the persistence records are ignored when a different pool is selected.
see bellow my config:
rule persist_msisdn_project {
when HTTP_REQUEST {
if { [HTTP::header exists "User-Agent"]} {
set getuseragent [HTTP::header "User-Agent"]
binary scan $getuseragent H* hexi
set useragent [regsub -all (..) $hexi {\1}]
} else {
set useragent ""
}
if { [HTTP::header exists "X-Header-msisdn"]} {
set persist_data [HTTP::header "X-Header-msisdn"]
set logStr "Persist on X-Header-msisdn"
} elseif { [HTTP::header exists "MSISDN"]} {
set persist_data [HTTP::header "MSISDN"]
set logStr "Persist on MSISDN"
} else {
set persist_data [IP::client_addr].$useragent
set logStr "Persist on Client IP Address and User-Agent"
}
persist uie $persist_data 1800
}
}
profile persist msisdn_persistence_profile {
defaults from universal
mode universal
mirror disable
rule persist_msisdn_project
}
virtual VIP-Project {
destination A.A.A.A:http
snat automap
fallback persist source_addr
ip protocol tcp
profile http tcp
persist msisdn_persistence_profile
rule project-Rule
vlans DMZ enable
}
rule project-Rule {
when HTTP_REQUEST {
if { [HTTP::uri] contains "/project/url-03" } {
HTTP::uri [string map { "/project/url-03" "/url-01" } [HTTP::uri]]
pool project_Pool_01
return
}
if { [HTTP::uri] contains "/project/url-02" } {
HTTP::uri [string map { "/project/url-02" "/url-02" } [HTTP::uri]]
pool project_Pool_02
return
}
if { [HTTP::uri] contains "/project/url-03" } {
HTTP::uri [string map { "/project/url-03" "/url-03" } [HTTP::uri]]
pool project_Pool_03
return
}
HTTP::respond 200 content "Invalid request in project rule"
return
}
}
pool project_Pool_01 {
action on svcdown reselect
slow ramp time 300
monitor all tcp
member 192.168.161.101:8044
member 192.168.161.111:8044
}
pool project_Pool_02 {
action on svcdown reselect
slow ramp time 300
monitor all tcp
member 192.168.162.121:8044
member 192.168.162.121:8044
}
pool project_Pool_03 {
action on svcdown reselect
slow ramp time 300
monitor all tcp
member 192.168.163.131:8044
member 192.168.163.131:8044
}
I can see that same source requests coming with a particular header (say for example X-Header-msisdn) and for a specific URL (say /project/url-02 ) are forwarded to either node in the pool (in this case project_Pool_02). I would have expected to have the requested persisted to the same node in the pool. Somehow the persistence is set (I did some logging from the persistence rule and I could see the persisnce record set to the correct value of the header), but then when the request is directed to the pool, the roun-robin algorith kicks in and selects whichever node in the pool is available.
What am I doing wrong here?
Thank you in advance,
Adrian
- Adrian_Turcu_10
Nimbostratus
I forgot to mention: I'm runing BIG-IP 9.2.5 Build 5.1 on a LTM-1500 series.... - Adrian_Keevill_
Nimbostratus
I would also be very interested in the answer to this, as I've got a similar issue :-) - hoolio
Cirrostratus
For Adriant_ie's rule, I would guess that the persistence is breaking if the client request is sent to a different pool than the one where the persistence record was created for. This is because the pools have different members.
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