Forum Discussion
John_Woods_4557
Nimbostratus
Jan 11, 2007poorly performing URI rule
80% of our traffic needs to use the WebPool2, but I am having difficulties getting this rule to perform well. Users are timing out completely trying to get to WebPool2. Can anyone help me optimize this quickly?
if (tolower(substr(http_uri, 0, 4)) == "/ab/") {
use pool WebPool1
}
else if (tolower(substr(http_uri, 0, 7)) == "/cdefg/") {
use pool WebPool1
}
else {
use pool WebPool2
}
Thanks in advance!
- Since you are just looking for the first characters in the string, have you tried the "starts_with" operator? substr actually allocates another string which has some overhead.
if (tolower(http_uri) starts_with "/ab/") { use pool WebPool1 } else if (tolower(http_uri) starts_with "/cdefg/") { use pool WebPool1 } else { use pool WebPool2 }
if ( (tolower(http_uri) starts_with "/ab") or (tolower(http_uri) starts_with "/cdefg/") ) { use pool WebPool1 } else { use pool WebPool2 }
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