Forum Discussion
Robert_Vernon_1
Nimbostratus
Apr 05, 2013Uinsing irules to fileter via uri context
So here is my situation:
I have a set of servers (poolA) running an 4 applications (context[A-D])
http://someserver/contextA
http://someserver/contextB
http://someserver/contextC ...
Kevin_Stewart
Employee
Apr 05, 2013Can you show us your iRule? Are you trying to route the traffic to the different applications based on a condition of the request (ie. URI, port, etc.)? If there are 4 different application servers in a single pool, how do you load balance?
In many cases admins will put the applications into separate pools and then switch pools on the request condition (like the URI).
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/contexta*" { pool contexta_pool }
"/contextb*" { pool contextb_pool }
"/contextc*" { pool contextc_pool }
default { pool default_pool }
}
}
In this way you can provide both load balancing for multiple application servers in a pool, and monitoring.
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