Nginx自1.1.4以后内置支持Upstream Keepalive 配置。

upstream http_backend {
    server 127.0.0.1:8080;

    keepalive 16;
}

server {
    ...

    location /http/ {
        proxy_pass http://http_backend;
        proxy_http_version 1.1;
        proxy_set_header Connection "";
        ...
    }
}

更多细节可参考:

http://nginx.org/en/docs/http/ngx_http_upstream_module.html#upstream

http://blog.csdn.net/gzh0222/article/details/8523635