Limit Nginx max concurrent connections

Viewed 12381

I am looking for a way to limit the number of maximum concurrent connections to 1. I do not want a connection limit per IP, I already know this is supported.

As far as I can see, max_conns would be exactly what I'm looking for, but unfortunately it's not available in the free version:

Additionally, the following parameters are available as part of our commercial subscription

Limiting worker_connections is not an option, as the minimum it wants is 4, and it affects more than the incoming requests.

My conf:

server {
listen       80;
server_name  localhost;

location / {
rewrite_by_lua '
     [some lua code]
';

    proxy_pass http://127.0.0.1:8080;
 }
}
1 Answers
Related