Search code examples
httpnginxhttpsserver

Why the number of successful requests is half the number of worker_connections in nginx?


If I set the number of worker_connections around like 968 with only one worker running and then use a script to make around 500 simultaneous requests to the server. 482 are successful every time. That's around half. Does that mean that every request needs two worker connections? Please someone explain.

Numbers of worker_connections and requests are completely arbitrary.


Solution

  • I found out after some research that: All types of connections (for example, connections with proxied servers) count against the maximum, not just client connections. So I was using a node server behind Nginx so it was costing two worker connections per request.