Forum Discussion
Joe_Curl_105786
Nimbostratus
Mar 31, 2010iRule Pool Selection
We have an iRule that we use to restrict access to only specific URI patterns. If the pattern is matched, then we select a pool. I was wondering if there is any way to tell it to select the pool that is tied to the specific VIP instead of creating this rule multiple times, and just changing the pool name. The pool name NRDC-PK-Mobility-QA-Pool is the name of the pool associated with the VIP. We are trying to make it more generic so we can use this single rule in many instances. Any assistance is appreciated. I have put an example of the rule below.
Joe
when HTTP_REQUEST {
if { ( [string tolower [HTTP::uri]] starts_with "/transportservlet" ) or ( [string tolower [HTTP::uri]] starts_with "/aliveservlet" ) } {
pool NRDC-PK-Mobility-QA-Pool
} else {
reject
}
}
1 Reply
Sort By
- The_Bhattman
Nimbostratus
Hi Joe,when HTTP_REQUEST { From the client side context it's going to determine the VIP address it's connected to if {[IP::addr [IP::local_addr] eq "192.168.12.3" } { switch -glob [string tolower [HTTP::uri]] { "/transportservlet*" - "/aliveservlet*" { pool NRDC-PK-Mobility-QA-Pool } default { reject } } } }
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