http{
limit_conn_zone $binary_remote_addr zone=conn_zone:1m;
server {
listen 80;
server_name localhost;
location / {
root /usr/code;
limit_conn conn_zone 1;
index index.html index.htm;
}
}
then
nginx -t -c /etc/nginx/nginx.conf
nginx -s reload -c /etc/nginx/nginx.conf
use
on another machineab -n 30 -c 30 http://192.168.0.10/1.html
or
ab -n 30 -c 30 -k http://192.168.0.10/1.html
the result is the same, there is no limit on the number of connections, all are successful, and the conn_zone is not in effect in the error log.
Concurrency Level: 30
Time taken for tests: 0.013 seconds
Complete requests: 30
Failed requests: 0
Write errors: 0