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] starts_with "/NGQMRepository_com" or
[HTTP::uri] starts_with "/NGQMRepository_res" or
[HTTP::uri] starts_with "/q4" or
[HTTP::uri] starts_with "/QMSCTWeb" or
[HTTP::uri] starts_with "/qmwise4" or
[HTTP::uri] starts_with "/repxcl4" or
[HTTP::uri] starts_with "/SCPCentral" or
[HTTP::uri] starts_with "/SCPIntermediarySrvce" or
[HTTP::uri] starts_with "/SCPRemote" or
[HTTP::uri] starts_with "/2004content" or
[HTTP::uri] starts_with "/Faculty_Virtual"} {
use pool server_group_a
}
}
I can do it in the following example, however you cannot do a uri check here, which needs to be done because some users will fall into multiple data groups.
when CLIENT_ACCEPTED {
if [matchclass [IP::client_addr] equals $::DVW] } {
use server_group_a
}
- 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...
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 } } } }
- Michael_Horvat_
Nimbostratus
When I get back to work I will try rewriting as you suggest and present a detailed explanation. - Michael_Horvat_
Nimbostratus
I see. Yes both examples assign a pool based on the conditions. However, the second example reacts differently than the first. Essentially, if the pool command reacted the same in the HTTP_REQUEST event as it does in the CLIENT_ACCEPTED event; the rule would work. The CLIENT_ACCEPTED event seems to set the default pool correctly where the HTTP_REQUEST event doesn't, however the CLIENT_ACCEPTED event is inadequate for the checks needed. I need the rule to set the default group as it does when using the CLIENT_ACCEPTED event, but also providing both the IP address and uri checks in the HTTP_REQUEST event. I also tried rewriting the check as previously suggested but, it doesn't change how the rule reacts.
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