Forum Discussion
iRule Not Sending Request to Correct Pool
I have an iRule:
when HTTP_REQUEST { log local0. "uri info: [HTTP::uri]" switch -glob [string tolower [HTTP::uri]] { "/webservice1*" { pool ws_pool1 } "/webservice2" { pool ws_pool2 } default { pool ws_pool3 } } }
which is suppose to send the requests to the specific pools but for some reason is only sending requests to the default pool. This is what gets logged:
Thu Apr 28 10:00:15 CDT 2016infotestloadbaltmm[10179] Rule /Common/ESBEndPoint : uri info: /webservice1 Thu Apr 28 10:00:17 CDT 2016infotestloadbaltmm[10179] Rule /Common/ESBEndPoint : uri info: /webservice1
Am I missing some configuration somewhere?
2 Replies
- Stanislas_Piro2
Cumulonimbus
Hi,
I don't see any error in the irule.
you can try to log selected pool after switch:
when HTTP_REQUEST { log local0. "uri info: [HTTP::uri]" switch -glob [string tolower [HTTP::uri]] { "/webservice1*" { pool ws_pool1 } "/webservice2" { pool ws_pool2 } default { pool ws_pool3 } log local0. "pool info: [LB::server pool]" } } - Khanh_vo_213579
Nimbostratus
Logging the pool clued us in on why it didn't work. It turned out the URI that we were checking against was not all lower case. Silly mistake.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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