Due to project requirements, it may put pressure on the concurrent requests of Web Services, so I thought of the method of Request control at the Apache layer.
Because there is already a mod_limitipconn that can be used for concurrent Connection Control, but because keepalive is used, you also need to control the total number of concurrent requests and after the concurrent request is exceeded, the business needs to redirect requests to a page. Therefore, the service needs to be modified based on mod_limitipconn to meet the business needs.
The configuration example is as follows:
Extendedstatus on
Loadmodule limitipconn_module modules/mod_limitipconn.so
<Ifmodule mod_limitipconn.c>
Maxconnperip 1000
<Location/imlogingw>
Maxconnperip 300
# Noiplimit image /*
Maxreqconcurrent 60
Exceedrequrl http: // 10.2.224.63/
</Location>
</Ifmodule>
Control the concurrency of the Directory http: // 10.2.224.63/imlogingw. When the threshold value (60) is exceeded, redirect the request to the http: // 10.2.224.63/page.
Correct use after stress testing
The original mod_limitipconn can be
Http://dominia.org/djao/limitipconn.html download, improved mod_limitipconn can be from
Http://limitipconnreq.googlecode.com/files/mod_limitipconn-0.23-jaymo.tar.gz