enabling keepalive increases request time

jlintz nginx-forum at nginx.us
Mon Sep 30 14:51:28 UTC 2013


HI,

I'm using Nginx 1.2.9 behind Amazon's ELB.  We recently moved our servers
behind the ELB and in testing enabling keepalives between the server and the
ELB we are seeing request times double from around 25ms to 50ms.  I tried
disabling postpone_output since I thought it was a buffering issue, but
still saw increased response times.  Anyone have any ideas what could
explain this?  Enabling keepalive , improves other metrics for us such as
TCP timeouts and CPU utilization, so we'd like to enable if we can.  

The nginx servers are just proxying to backend servers , also utilizing keep
alive on the upstream.  Below are the main options we are using 


worker_processes     2;
worker_rlimit_nofile 500000;


events {
    worker_connections  20000;
}

http {


    sendfile           on;
    tcp_nopush         off;
    tcp_nodelay        off;
    gzip               off;
    keepalive_requests  100000;
    output_buffers   8 64k;
    postpone_output  0;


server {
listen *:80 default deferred backlog=16384;

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,243267,243267#msg-243267



More information about the nginx mailing list