Forum Discussion
rodrigo_Benzaqu
Nimbostratus
May 13, 2005Irule from 4.6 to 9
Hi, I´m new on 9.X, can some body help me to translate this rule to 9.X ?
rule FD_Fetch {
if (http_uri starts_with "/fd/") {
use pool FD_SERVERS
}
else if (http_host == "www.mercadolibre.com.ar") {
use pool NC3100N
}
else if (http_host == "www.mercadolivre.com" or http_host == "www.mercadolivre.com.br") {
use pool Netcache_3100
}
else {
use pool Mexico
}
}
6 Replies
- JRahm
Admin
Try this:
rule FD_Fetch {
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/fd/" } {
use pool FD_SERVERS
} elseif { [HTTP::host] equals "www.mercadolibre.com.ar" } {
use pool NC3100N
} elseif { [HTTP::host] equals "www.mercadolivre.com" or \
[HTTP::host] equals "www.mercadolivre.com.br" } {
use pool Netcache_3100
}
else {
use pool Mexico
}
}
} - tonio_tian_1127
Nimbostratus
try this
when HTTP_REQUEST {
if {[HTTP::uri] start_with "/fd/"}{
pool FD_SERVERS}
elseif {[HTTP::host] equals "www.mercadolibre.com.ar" }{
pool NC3100N}
elseif {[HTTP::host] equals "ww.mercadolivre.com" or [HTTP::host] equals "www.mercadolivre.com.br" }{
pool Netcache_3100}
else {
pool Mexico
}
} - rodrigo_Benzaqu
Nimbostratus
Thanks Guys,
Just another questions, maybe I´ll have 30 differents domains. If I create an Irule with 30 (if), will affect my site performance ?
We have like 600 mbts x second.
Thanks
Rodrigo. - JRahm
Admin
One of the developers would probably be a better source for where the threshold is, but at some point it's wise to build a class and use matchclass in your rule. - rodrigo_Benzaqu
Nimbostratus
Clear, do you have an example of this rule using the matchclass ?
and how to create a class ? - JRahm
Admin
class WebURLs { "www.mercadolivre.com" "www.mercadolivre.com.br" } when HTTP_REQUEST { if { [HTTP::uri] starts_with "/fd/" } { use pool FD_SERVERS } elseif { [HTTP::host] equals "www.mercadolibre.com.ar" } { use pool NC3100N } elseif { [matchclass [HTTP::host] equals $::WebURLs] } { use pool Netcache_3100 } else { use pool Mexico } }
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
