Forum Discussion
Jun 03, 2013
iRule optimization
My iRule needs to exact-match on host and wild-card match on path.
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"internal.mycompany.com" {
...
nitass
Employee
Jun 03, 2013i think the 1st one is better.
1st
[root@ve10:Active] config b rule myrule list
rule myrule {
timing on
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"internal.mycompany.com" {
switch -glob [string tolower [HTTP::path]] {
"/api1/*" { }
"/api2/*" { }
"/api3/*" { }
}
}
}
}
}
ab -n 1000 http://internal.mycompany.com/api3/something
[root@ve10:Active] config b rule myrule show all
RULE myrule
+-> HTTP_REQUEST 1000 total 0 fail 0 abort
| Cycles (min, avg, max) = (40248, 54421, 442966)
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