Forum Discussion
Leslie_South_55
Nimbostratus
Sep 25, 2007Simple pool selection using URI not so simple...
Greetings once again, I am trying to select a pool based on content in the URI; what I am seeing is the first request selects the pool correctly, but requests that follow are using the default pool.
VS with cookie insert persistence
default pool defined in the VS resource
rule looks like this
when HTTP_REQUEST {
if { [HTTP::uri] contains "en_CA" } {
use pool pool_cananda
log local0. "Canada request - canada pool"
}
else { use pool pool_us }
log local0. "using default pool"
}
here are some log entries
Sep 25 12:13:39 tmm tmm[1055]: Rule rule_test-can_redirect : using default pool
Sep 25 12:17:46 tmm tmm[1055]: Rule rule_test-can_redirect : Canada request - canada pool
Sep 25 12:17:46 tmm tmm[1055]: Rule rule_test-can_redirect : using default pool
Sep 25 12:17:50 tmm tmm[1055]: Rule rule_test-can_redirect : Canada request - canada pool
Sep 25 12:17:50 tmm tmm[1055]: Rule rule_test-can_redirect : using default pool
Sep 25 12:17:57 tmm tmm[1055]: Rule rule_test-can_redirect : Canada request - canada pool
Sep 25 12:17:57 tmm tmm[1055]: Rule rule_test-can_redirect : using default pool
Sep 25 12:17:57 tmm tmm[1055]: Rule rule_test-can_redirect : using default pool
Sep 25 12:17:57 tmm tmm[1055]: Rule rule_test-can_redirect : using default pool
Sep 25 12:17:57 tmm tmm[1055]: Rule rule_test-can_redirect : using default pool
Sep 25 12:17:57 tmm tmm[1055]: Rule rule_test-can_redirect : using default pool
Sep 25 12:17:57 tmm tmm[1055]: Rule rule_test-can_redirect : using default pool
What am I missing?
-L
- Leslie_South_55
Nimbostratus
Can anyone provide some insight on this? I'm still stuck. - Andy_Herrman_22
Nimbostratus
Here's the code you gave, reformatted a bit:when HTTP_REQUEST { if { [HTTP::uri] contains "en_CA" } { use pool pool_cananda log local0. "Canada request - canada pool" } else { use pool pool_us } log local0. "using default pool" }
when HTTP_REQUEST { if { [HTTP::uri] contains "en_CA" } { use pool pool_cananda log local0. "Canada request - canada pool" } else { use pool pool_us log local0. "using default pool" } }
- Leslie_South_55
Nimbostratus
we can mark this one in the "DOOHH" category; it turns out that I had another rule that I use to trasfert HTTP to HTTPS and in that rule, there was an 'else pool pool_us" statement. This was causing the traffic to be sent to the US pool, once I removed it, it redirects correctly.
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