Forum Discussion
Need Assistance with iRule on adding multiple pools
My default pool is prod.ria.internal.com which works. However when I type in my url of testing.com/application the iRule is not using the /application pool. Any thoughts? Thanks in advance.
when HTTP_REQUEST { Check requested uri header (set to lowercase) switch -glob [string tolower [HTTP::uri]] { "/blog" { pool prod.ola.internal.com } "/application" { pool prod.ola.internal.com } default { pool prod.ria.internal.com } } }
5 Replies
- Ron_130795
Nimbostratus
Im running code 10.2.4 - Arie
Altostratus
Could it be that the request adds a trailing slash? You're not looking for that in the switch. You could see what happens if you add an asterisk to your criteria:
when HTTP_REQUEST { Check requested uri header (set to lowercase) switch -glob [string tolower [HTTP::path]] { "/blog*" { pool prod.ola.internal.com } "/application*" { pool prod.ola.internal.com } default { pool prod.ria.internal.com } } } - Kevin_Stewart
Employee
The iRule example is syntactically correct, so I'd say there could be one of two problems:
-
The pools are incorrectly configured, and requests are potentially going to the wrong server(s), or:
-
The URI patterns are incorrect. The best way to troubleshoot this is with a client side capture of a browser communicating directly with the application.
-
- Ron_130795
Nimbostratus
Thanks Kevin.
When I type in prod.ola.internal.com/application or /blog I get a "Cannot GET /application" error or "Cannot GET /blog" error
- Kevin_Stewart
Employee
I also can browse to the application and blog page using the server IP and port with no issues.
Understood. So if you go directly to the server, you don't have a problem getting to the application. The next steps should be:
-
Perform a tcpdump on the external interface of the F5 and make your request. Do you see the traffic coming from the client to the VIP?
-
Perform a tcpdump on the internal interface of the F5 and make your request. Do you see the traffic from the client going to the (correct) server? If so, do you see the server responding back through the F5?
-
Perform a client side HTTP capture and look at the HTTP requests and responses. Do you see an HTTP response from the server?
-
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