We use nginx with the application server as a backend.
We need to limit the number of concurrent connections for each IP address. For this purpose, we used the limit_conn nginx directive. But in all cases this does not work. If the user generates many connections from one IP address and quickly closes them, then nginx sends this request to the backend, but since the client connection is already closed, this connection is not considered to limit_conn .
Is it possible to limit the number of concurrent connections for each IP server on a server with nginx?
Anton source share