Forum Discussion
Brandon_High_10
Nimbostratus
Jan 27, 2005switch matching incorrectly
We've seen a few errors that seem to come from a request being sent to the wrong pool.
We have an iRule similar to:
when HTTP_REQUEST {
switch -glob [HTTP::path] {
/gwp* {
pool gwp_pool
}
default {
persist none
pool default_pool
}
}
We were seeing occasional error with broken images. The images which would break was inconsistant, as was the frequency of breakage. All the graphics are located in /images.
To fix this, we added another switch case like:
/images/* {
pool default_pool
}
This resolved the problem. However, I'm currious if there is something wrong in the iRule or HTTP profile that could cause requests to be directed to the wrong pool.
The HTTP profile in use is the default HTTP from F5.
- drteeth_127330Historic F5 AccountI don't see anything wrong with your rule. Are there any errors reported in /var/log/ltm when this occurs?
- Brandon_High_10
Nimbostratus
No, no errors being reported. It's been difficult to track down since it can't be reliably debugged. - Brandon_High_10
Nimbostratus
I made a mistake when I posted the first code sample. The iRule that is having problems looks more like the following. The 'default' condition doesn't specify the pool to use, so it should be using the virtual server's configured default.when HTTP_REQUEST { switch -glob [HTTP::path] { /gwp* { pool gwp_pool } default { persist none } }
default { persist none pool default_pool }
- unRuleY_95363Historic F5 AccountThanks for clarifying this.
when LB_SELECTED { log "picked: [IP::remote_addr] from pool: [LB::server pool]" }
- Brandon_High_10
Nimbostratus
There are some debugging statements for each element of the switch:if { $DEBUG } { log local0. "proxy to dailyink" log local0. "[HTTP::host]" log local0. "[HTTP::path]" }
<--Previous log's removed for brevity-->
- unRuleY_95363Historic F5 AccountAh hah! The fact that the problem only happens in subsequent requests within the same connection tells me that this is related to our OneConnect feature.
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