Forum Discussion
Sekou_Page_1118
Nimbostratus
Apr 26, 2006HTTP_Request URI performance question
I would like to know which type of request is more efficient as iRules get longer. We have a need to direct clients to specific pools of web servers depending on the URL they used. However, we have ...
JRahm
Admin
Apr 26, 2006Try this:
class myURI {
"c1 WEB02"
"c2 WEB02"
"d1 WEB01"
"d2 WEB01"
}
when HTTP_REQUEST {
set myPool [findclass [string tolower [HTTP::uri]] $::myURI " "]
if { info exists $MyPool } {
pool $MyPool
Next 3 lines only necessary
if /[cd][12]/ needs to be trimmed from the URI
set preURI [string trimleft [HTTP::uri] "/"]
set finalURI [string trimleft $preURI "/"]
HTTP::uri "/$finalURI"
}
}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
