F5 Distributed Cloud Origin Server Subset Rules

Introduction:

F5 Distributed Cloud (XC) Origin server subset rules provide the ability to create match conditions on incoming source traffic to the HTTP load balancer. The match conditions include Country, ASN, Regional edge (RE), IP address, and client label selectors for subset selection of destination (origin servers). This helps in customized routing based on request information.

Scenario description:

As there is a decent increase in Holiday retail sales every year, which leads to an increase in ecommerce shopping during Thanksgiving, Cyber Monday, and Holiday season as well. It is observed that there is a spike in web traffic to 38% and Black Friday sees 3x the traffic than normal days during this time frame, and this has led to 1.7 billion online visits during the global holiday season. Under these circumstances, users in certain locations consume more than 50% of global traffic. An event of this nature requires infrastructure that must easily scale up to match the surge in traffic.

Solution suggested by F5 XC:

One of the most suitable solutions for this challenge is to identify the users’ demands and their geographical location and distribute the traffic by increasing further bandwidth to the existing or new servers. This diversification in traffic based on geo location helps the users to access the application specifically for their immediate needs there by avoiding wait time or outages during this period.

This is achieved using F5 XC Origin Server Subset rules, which helps to redirect the traffic based on Geo Location with subset rules.

F5 XC SaaS Console Configs:

Below are the steps to be followed to redirect the traffic that helps in solving the situation mentioned above,

  1. Create a label (key-value pair)
  2. Add labels to one or more origin servers
  3. Create subset rule in Load Balancer

Step 1: Creating a label (key-value pair).

  • Login to F5 XC Console and select Shared Configuration box.

  • Select Manage in left-menu and then select Labels > Known keys. Click on “Add Known key” button.

  • In the open tab, Enter Label key name along with Values for the key.
  • Use “+ Add Label Value” link to add more than one value.
  • Select Add Key button to complete creating the key-value pair.

  • Verify the labels that are displayed as key-value pairs by navigating to Manage > Labels > Known Labels.

Step 2: Adding labels to one or more Origin Servers.

  • At first, From the F5 XC home page, click on Multi-Cloud App Connect and Navigate to Origin pool using Manage > Load Balancers > Origin Pools. Select the Origin pool to which labels must be assigned and click on Edit configuration.
  • From the Origin server section, click on the pencil icon from the Actions column to add labels to the origin servers.

  • Enable the Show Advanced Fields option on the top right of the Origin server section.
  • Click on Add Labels under Origin Server Labels and Select the key as “subset-geo” and assign value as “US”. Click on Apply.

  • We can see labels being displayed under the Labels column to the respective origin server as shown below.

  • Repeat the same process to the servers for which user traffic from US Geo Location to be redirected to.

  • Assign the rest of the servers in the pool with the associated Label as per the requirement. In this scenario, I have assigned labels as “subset-geo” and “other”.
  • Click on Apply. This assigns the Labels to the Origin Servers.

  • The resultant display is shown above.
  • Scroll down to the Other Settings section and click on Configure.

  • From the Origin server Subsets section, Select Enable Subset Load Balancing from the Enable/Disable Subset Load Balancing dropdown and click on Configure.

  • Click on Add Item under Subset Classes section.

  • Enter the Key that was created in Step 1 in List of Keys for Subset section and Click on Apply button.

  • Click on Apply button twice that redirects back to Origin Pool configs and then click on Save and Exit to save the Origin Pool configs.

Step 3: Creating subset rule in Load Balancer.

  • From the F5 XC home page, click on Multi-Cloud App Connect and Navigate to Manage > Load Balancers > HTTP Load Balancers.
  • Select the Load Balancer to which Subset rule must be configured and click on Manage configuration.

  • Enable the Show Advanced Fields option on top right of the Origins section and click on configure under Origin Server Subset Rules.

  • Click on Add Item in Origin Server Subset Rules section to add the Origin Server Subset rules.

  • Create a rule with name, under Action section. Click on Add Label to provide key and value pair created in step 1.
  • From the Clients section, select United States from the drop-down menu of Country Codes List. Click on Apply.

  • Create a new rule like above by adding key and value pairs as “subset-geo” and “other” under Action section.
  • Include the necessary countries in the Country Codes List in the Clients Section.

This rule helps in redirecting the traffic from the countries mentioned below to use different servers apart from the server allotted for United States, thereby providing more Bandwidth to the Users in United States.

  • Scroll down to the bottom and click on Apply.

  • Click on Apply and then Save and Exit.

It is observed from the above logs that the users from US Geo location directed as per Origin Server Label associated with it.

Whereas the users apart from US get load-balanced to different Origin Server as mentioned in Origin Pool as per Label configs.

Thereby, users in the US could be able to experience the enhanced capability of their allocated servers. This helps in avoiding outages, bottlenecks.

Note: Given requirement can also be achieved using RE match condition as well by adding necessary REs as shown below.

Conclusion:

F5 XC analyzes the traffic based on its origin, such as Regional Edges, Geo Location, IP Match and more and redirects the traffic as per Origin Server Subset Rules configuration. This simple and effective technique could be able to meet the users’ demands in no time and helps in solving major issues during peak usage hours of e-commerce sites.

Related Links:

https://roirevolution.com/blog/2022-holiday-ecommerce-stats-trends-predictions/

https://docs.cloud.f5.com/docs/how-to/others/create-known-labels-keys

https://docs.cloud.f5.com/docs/how-to/app-networking/origin-pools

https://docs.cloud.f5.com/docs/how-to/app-networking/http-load-balancer

Updated Nov 28, 2023
Version 2.0

Was this article helpful?

No CommentsBe the first to comment