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 opti...
Jan 17, 2007
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
}
Or, you could combine the first two checks into the first if
if ( (tolower(http_uri) starts_with "/ab") or
(tolower(http_uri) starts_with "/cdefg/") ) {
use pool WebPool1
} else {
use pool WebPool2
}
Those should both perform roughly the same though.
I'm not sure you could optimize this rule more that this.
-Joe
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