Layer 7 Content Routing in F5 XC

Many of us are well-versed in setting up Layer 7 Content Switching, based on an URL Path or based on the Host header, with iRules or with LTM Local Traffic Policies. Now I have been tasked to setup Layer 7 Content Switching based on the Host header with F5 XC (Distributed Cloud Services).

For those who are not familiar with the content, I will briefly illustrate what Layer 7 Content Switching is.
With Layer 7 Content Switching, also called L7 Routing, your loadbalancer will make a loadbalancing decission based on an information that is available at the application layer. That information can be for example the Host header or a part of the URL. Based on this information a routing decission will be made and a certain backend (or origin server) will selected.

 Now in BIG-IP this can be achieved fairly easy by the means of iRules or LTPs. In F5 XC this can be achieved by using Routes. I created the required Routes object in the HTTP Load Balancer object. You will have to provide a Name for the Routes object and configure the Routes.

The important part is the matching section of the configuration. In my example I will match for ANY HTTP method, for any URL path that has the prefix / - means again anything. And, most important, I will configure Headers to match with the Match Value demo01.mydomain.com for the header name Host. This will then be routed to the Origin Pool serving the contents for demo01.mydomain.com.
I configured the same again with the required values for demo02.mydomain.com.

Important is that you have both domains configured on your HTTP Load Balancer object as well.

 

 Enjoy your working setup. Extract from the metrics:

demo01.mydomain.com

demo02.mydomain.com

Overall view

Updated Dec 09, 2022
Version 2.0

Was this article helpful?