Large keepalive_requests values are severely slowing-down Nginx
- by Gil
When running a bacon (43-byte transparent pixel) load test on Nginx, we have tried several keepalive_requests values (from 10 to 100,000) and the optimal value seems to be 10.
Here are the server HTTP headers of this tiny reply:
HTTP/1.1 200 OK
Server: nginx/1.5.6
Date: Wed, 23 Oct 2013 12:39:45 GMT
Content-Type: image/gif
Content-Length: 43
Last-Modified: Mon, 28 Sep 1970 06:00:00 GMT
Connection: keep-alive
Nginx is twice slower with keepalive_requests 100000 than with keepalive_requests 10.
Can you help understanding that result? Or tell what we do wrong?
For reference, here is the nginx.conf file.