Skip to main content
Version: 3.14.x.x LTS

Limit concurrent requests

It is possible to limit the number of concurrent requests to a URL. You implement the limitation by means of a filter. See also the next example. It limits the number of concurrent requests to the path /application/a/ to 100, and those to the path /application/b/ to 50:

<filter>
<filter-name>LimitRequest</filter-name>
<filter-class>ch:nevis:navajo:apglue:httpd_${HTTPD_LIB_VERSION}_x:servlet:ApacheConfigFilter</filter-class>
<filter-lib>@PKG_HOME@/webapp/WEB-INF/lib/libApache${HTTPD_LIB_VERSION}_Servlet.so.1</filter-lib>
<init-param>
<param-name>ServerConfig</param-name>
<param-value>
LoadModule qos_module @PKG_HOME@/lib/libmodqos_ap_${HTTPD_LIB_VERSION}.so.1
QS_LocRequestLimit '/application/a/' 100
QS_LocRequestLimit '/application/b/' 50
</param-value>
</init-param>
</filter>

You need the optional library /opt/nevisproxy/lib/libmodqos_ap${HTTPD_LIB_VERSION}.so.1 to be able to use the parameter org.apache.host.QS_LocRequestLimit. If you have not load this library already, do it now. You can find the above example configuration in the installed nevisProxy package, in the directory /opt/nevisproxy/examples/apache_module/.