Configuring and Testing Access Throttling for Pass Through Proxy Services




In this blog post I will show how to configure Access Throttling for a pass through proxy and test using SoapUI. The throttle mechanism is used to control access to our services at different levels. For this scenario I am using the wso2esb-4.8.0 which can be downloaded hear

To create a pass through proxy refer my previous blog titled testing-secure-pass-through-proxy.

In addition to the steps mentioned on the blog listed above, click on the option Access Throttling for the active proxy service. Then the system will ask if we want to Enable Throttling? at this point select the "Yes" option. The system will generate a screen similar to the screen shown on the below image.


As the above image shows we can configure throttling for both IP and Domain levels. In my example I will use both options to limit the request the proxy service can serve. 

Enter the IP address under range and select the type as IP. next, specify the maximum request count allowed this is the number of request the proxy service will server before limiting further request. The "Unit Time (ms)" will enable the Max Request Count within a specific time period ex: 60000 milliseconds to be served. "Prohibit Time Period (ms)" will enable us to specify how much time a proxy service can block request coming if the max number of request have exceeded. In the same way enter the domain rage as ex: *.wso2.org and specify the same values if we need to monitor request coming into the proxy service based on the domain. 

Once these information are entered click on the "Finish" button. This will save the throttling details for the proxy service.

To test the throttling output create a JMeter script and send multiple request, as shown below the jmeter request will start failing once the max request count has reached.


The Jmeter script for this example can be downloaded from hear. Please change the host and the port as applicable. The source for the proxy service for this example can be downloaded from hear

Comments