Forum Discussion
Brad_Baker
Cirrus
Oct 01, 2013Directing traffic based on query parameter
We need the ability to direct traffic to a specific node on our LTM load balancers based on query parameter.
So for instance if I enter www.foo.com/some-article?s=web-server1 the request would ...
StephanManthey
Nacreous
Oct 01, 2013Same datagroup. Slightly different iRule ([URI::query] does not work as expected in v10):
when CLIENT_ACCEPTED {
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
if {[class match -value [string tolower [URI::query [HTTP::uri] s]] eq dg_name_node] ne ""} {
node [class match -value [string tolower [URI::query [HTTP::uri] s]] eq dg_name_node] 80
}
}
when LB_FAILED {
log local0. "Selected server [LB::server] did not respond. Re-selecting node from $default_pool"
pool $default_pool
LB::reselect
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
