Forum Discussion
Luca_55898
Aug 03, 2011Nimbostratus
Possible performance issue with iRule?
Hi,
I have this iRule configured on a fairly standard HTTP VIP.
"when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"/ee/employer*" { pool Pool_ee_employer_83 }
"/ee/search*" { pool Pool_ee_search_84 }
"/pack*" { pool Pool_pack_85 }
}
}"
The VIP does not have any persistance configured.
It has the default HTTP profile assigned
No default pool is selected either.
The iRule works fine, however people have been complaining that the images on the pages take a while to load and sometimes do not load at all.
When testing if i continually press refresh on my browser the images will load, but also the page changes its layout. For example - it goes from left aligned to centre aligned. Sometimes borders are displayed, sometimes they are not.
Could this be an issue with the iRule or the F5?
- Kevin_Davies_40Nacreous1. Since you have no default for the switch you have no way to tell if some URI's are failing to match. You should add a default which logs the unmatched URI as they will fail to get a response if no pool is selected...
switch -glob [HTTP::uri] { "/ee/employer*" { pool Pool_ee_employer_83 } "/ee/search*" { pool Pool_ee_search_84 } "/pack*" { pool Pool_pack_85 } default { log "Unmatched URI [HTTP::uri]" } }
- Luca_55898NimbostratusThanks,
- Kevin_Davies_40NacreousYes it will log to /var/log/ltm
- Luca_55898NimbostratusYep so i'm seeing lots of Unmatched URI logs now:
- Kevin_Davies_40NacreousThe unmatched entries pretty much reveal the problem. My suggestion is to use HTTP classes because they are designed for this kind of job. You will need one for each pool and a default catch-all at the end. Mind you having a default pool will have the added benefit as showing the VIP as being up instead of unknown.
- boomchke_11156NimbostratusWhere is the default log location set? Can that be modified? Thats a great tip on using the 'deafult' command.
- Michael_YatesNimbostratusBy default log files go to /var/log/ltm
- Luca_55898NimbostratusSo i configured a HTTP class and got all this working, so thanks for the assistance.
- Kevin_Davies_40NacreousThe recommended way is to always use built-in functionality unless specifically told otherwise. HTTP classes were added to the F5 to solve these kinds of problems without the need of iRules. Please do not forget the default catch all http class at the end to send traffic back to the default pool or you may get unexpected results.
- Luca_55898NimbostratusI just added a default pool to the VIP.
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