iServer Concurrent Request Control Mechanism

Feedback


In Web-based GIS applications, when concurrently accessing services published by large-scale GIS data (such as map rendering, data querying, or spatial analysis on tens of millions of vector data), performance bottlenecks in GIS servers often occur due to thread resource exhaustion, subsequently causing delayed responses or inaccessibility of management pages. To ensure the GIS server can function properly, it is generally recommended to improve machine resource utilization by increasing the JVM maximum heap memory and maxThreads of Tomcat. However, when machine resources are limited, these methods cannot simply resolve the issue. To address this problem, iServer provides a concurrent request control mechanism that can effectively allocate threads used in business operations to guarantee overall server access performance. This mechanism is enabled by default. To disable or adjust parameters, you can modify the iServer configuration file: [SuperMap iServer installation directory]\webapps\iserver\WEB-INF\web.xml.

The configuration of the concurrent request limit is as follows:

<filter> 
      <filter-name>requestLimitFilter</filter-name>
      <filter-class>com.supermap.server.host.webapp.ConcurrentRequestLimitFilter</filter-class>
      <async-supported>true</async-supported>
      <init-param>
            <param-name>enableRequestLimit</param-name>
            <param-value>true</param-value>
      </init-param>
      <init-param>
            <param-name>limitUrls</param-name>
            <param-value>/iserver/services/.*/rest.*;/iserver/services/.*/wms.*;/iserver/services/.*/wfs.*;/iserver/services/.*/arcgisrest.*</param-value>
      </init-param>
      <init-param>
             <param-name>maxConcurrentRequest</param-name>
             <param-value>160</param-value>
      </init-param>
      <init-param>
             <param-name>maxWaitTime</param-name>
             <param-value>60000</param-value>
      </init-param>
</filter>
<filter-mapping>
      <filter-name>requestLimitFilter</filter-name>
      <url-pattern>/*</url-pattern>
</filter-mapping>

In which,

Notice:

1. When multiple web filters exist at the same time, the loading and implementation of each web filter has a strict order relationship. It is consistent with the definition order of each web filter in the web.xml file. In order to make requestLimitFilter work, you need to define FilterMappping for the Filter in web.xml.

2. After the web.xml configuration is completed, restart the iServer to take effect.