F5 Redirect HTTP traffic to different ports based on context root
Hello folks,
We have an application built on microservices i.e. each component within the application is hosted on the same machine but different tomcat instances i.e. different ports (8080, 8081, 8082).
Scenario: We have a virtual server (https://abc.com) pointing to for example 21.12.3.8:8080.
Based on the context root, I would like the traffic to be routed to different ports where they are hosted.
E.g. /example1 is hosted on port 8080, /example2 is on 8081, /example3 is on 8082.
If the url is https://abc.com/example1/*, the traffic should be routed to 21.12.3.8:8080. If the user clicks another tab on the application UI then the context root changes from /example1 to /example2 etc and F5 should redirect it to a different tomcat instance on the same machine i.e. If context root changes to /example2/* then traffic to be routed to 21.12.3.8:8081, for /example3/* routed to 21.12.3.8:8082.
Hope we get pointed in the right direction.
Thanks