Forum Discussion
iRule to have different client-side URIs use different server side tcp ports
I think, this is something which can be achive using LTM policy as well iRules. But i would recommend you to use LTM policy here. As per your requirement, you can match the host/URI and route traffic to the specific pool.
Now as you have backend servers listening on different services, create separate pools for each service. Map it properly to the desired pool under action tab. Below snap will give some idea about the LTM policy statements. Accordingly you can write multiple condition and route the traffic.
Also if you want to use iRule, your irule will be like given below. I have just given one example here. You can write similar statements as required using if and else-if statements.
when HTTP_REQUEST {
if {([HTTP::uri] contains "Food")} {
# code
pool Food_Pool
}
Coming to the point, where client should not be able to see internal application port e.g. 82,83. So here you need to have virtual server listening on http and/https services. Once client request will hit virtual server on http/https VS, it will be forwarded to backend mapped pool member which is pointed to application port. So In this case, client wont be able to see actual application port/service. Client will see only application URL like https://mysite.company.com/Food
Hope it helps!
Mayur
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