Kemp Support, how can we help?

The latest application delivery knowledge and expertise at your fingertips.

URL Based Limiting

 

Information

 

Summary:

When using QoS/Limiting, and in particular, URL Based Limiting with URL Request, it is currently only possible to limit based on the simple path/location For example, the following path: /folder/website.html/. This article will outline an alternative solution when limiting based on the full URL is required. For example, the following full URL: https://site.domain.com/folder/wesbite.html?query=true

Environment:

Product: LoadMaster

Version: 7.2.53.0 and above

Platform: Any

Application: Any

Question/Problem Description:

URL Based Limiting with URL Request can only limit based on the simple path/location of the URL. How can the full URL (hostname + path/location + query [optional]) be limited?

Steps to Reproduce:  
Error Message:  
Defect Number:  
Enhancement Number:  
Cause:  
Resolution:  
Workaround:

The workaround solution requires the use of Sub Virtual Services (SubVSes) and Content Matching rules to achieve the desired goal. Here are the steps on how to build the necessary configuration:

  1. On the LoadMaster create a Virtual Service (VS) that has two SubVSes configured.
  2. Under the Rules & Checking > Content Rules section, create a new rule that resembles the below syntax. The Match String fields need to be customized in the below example. The ?query in the Match String field is also optional:
Rule Name Match_FullURL
Rule Type Content Matching
Match Type Regular Expression
Header Field  
Match String /^site.domain.com\/folder\/website.html\?query=value$/
Negation  
Ignore Case True
Include Host in URL True
Include Query in URL True
Fail On Match  
Perform If Flag Set [Unset]
Perform If Flag is NOT Set [Unset]
Set Flag If Matched [None]

 
4. Enable Content Switching under the Advanced Properties section of the VS and then apply the rule created above to the first SubVS (there will be a red box beside the first SubVS highlighting where to apply this rule). The rule for the second SubVS will be the Default rule, applied in the red-highlighted box beside the second SubVS. 
5. Modify the first SubVS and add the real server, and then set the QoS/Limiting HTTP Requests per second value as desired. 
6. Next, go to the global QoS/Limting under System Configuration and under Limiter Options, set the Error Responses to 429 Too Many Requests and also enable Fail on RS / Sub-VS Rate Limiting.
7. The second SubVS can be configured with a real server and without any limiting as desired.

Notes:

For more information on QoS/Limiting, please see the following guide:

https://support.kemptechnologies.com/hc/en-us/articles/14337466579725-Rate-Limiting


Was this article helpful?
0 out of 0 found this helpful

Comments