Forum Discussion
Pool 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.
2 Replies
- 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.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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