Forum Discussion
JeremyBlough_19
Nimbostratus
Dec 15, 2017Pool Redirection based on iRule
I have an iRule that uses a specific URI extension to send traffic to a pool.when HTTP_REQUEST { Log debug to /var/log/ltm | 1=yes, 0=no set debug 0
Identify the requested page and store in a variable
set httppath [string tolower [HTTP::path]]
Traffic decision based on the requested page's file extension
switch -glob $httppath {
"/graphql*"
{
if { $debug } { log local0. "**************************************************************" }
if { $debug } { log local0. "START" }
if { $debug } { log local0. "Path: $httppath" }
pool pool_name
}
}
}
However after a successful redirect to the correct pool, any further requests even without /graphql as a URI get forced to that pool until multiple page refreshes. I am not using persistence profiles with this pool/virtual server.
Can anyone help me at pointing out where this redirect/persistence is coming from.
- Andy_McGrath
Cumulonimbus
HTTP_REQUEST { Log debug to /var/log/ltm | 1=yes, 0=no set debug 0 Identify the requested page and store in a variable set httppath [string tolower [HTTP::path]] Traffic decision based on the requested page's file extension switch -glob $httppath { "/graphql*" { if { $debug } { log local0. "**************************************************************" } if { $debug } { log local0. "START" } if { $debug } { log local0. "Path: $httppath" } pool pool_name } default { pool defaultPool } } }
- BigD_300005
Cirrostratus
You can also use LTM's policies to do this instead of an iRule.
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