Forum Discussion
Michael_Horvat_
Nimbostratus
Mar 28, 2007Default pool
Is there a way you can set a default pool in the HTTP REQUEST event after a check like this.
when HTTP_REQUEST {
if { [matchclass [IP::client_addr] equals $::DVW] and
[HTTP::uri] ...
Mar 28, 2007
I'm confused. You are asking whether you can assign the pool based on conditions, and your first example does just that. Then you say you are doing it in the second example, but that code doesn't use the pool command at all. And, in the second example you are saying you cannot do a URI check, but that's what you did in the first example...
From what I can tell, your first example should route to the pool server_group_a if any of the conditions are met. Maybe it's your mixing of "and" and "or"s. I would recommend redoing the first example to as follows:
when HTTP_REQUEST {
if [matchclass [IP::client_addr] equals $::DVW] } {
switch -glob [HTTP::uri] {
"/NGQMRepository_com*" -
"/NGQMRepository_res*" -
"/q4*" -
"/QMSCTWeb*" -
"/qmwise4*" -
"/repxcl4*" -
"/SCPCentral*" -
"/SCPIntermediarySrvce*" -
"/SCPRemote*" -
"/2004content*" -
"/Faculty_Virtual*" {
pool server_group_a
}
}
}
}
The "-" at the end of each switch case acts as an "or" between all the comparison values. So, this code should pass traffic to the pool server_group_a for all client IPs in the DVW class AND the URI begins with one of the values (because of the "*" in the glob expression for each test).
If I have it wrong, then if you present a detailed explanation of the possible inputs and the desired results we can try to help you out further.
-Joe
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