Forum Discussion
Port forwarding based on FQDN and URI match
Hi,
I'm splitting a web application into two instances to allow them to organically change over time without impacting each user community.
At the moment, the F5 uses the FQDN to forward to the web application port (55543). When I have two web applications, I want to use the same FQDN, but forward to a different port with as little impact to users as possible. As a result, I would like to include some form of URI matching to additionally determine the port to forward to, for example;
--> port 55543 (existing web application) --> port 55544 (new web application)
I'm not sure if it's best/required to explicitly include a 'URI does not contain "/new"' condition for the existing web application (55543) and to include a 'URI contains "/new"' condition for the new web application (55544).
For info, the FQDN maps to a pool of two web servers, which will be configured identically for resilience purposes.
I'm sure this is straightforward, but could do with a few pointers please.
Kind regards
Jon
- Kevin_Stewart
Employee
-
Create two pools, one for each set of instances listening on the respective application port (55543 and 55544).
-
Create a simple iRule that switches between them based on URI:
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/new*" { pool pool_55544 } default { pool pool_55543 } } }
-
Enable OneConnect on the VIP if you expect users to be flipping between the pools mid-session.
-
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