# How to find a suitable number for the keepalive connections?

**URL:** <https://www.ruby-forum.com/t/how-to-find-a-suitable-number-for-the-keepalive-connections/224247>\
**Category:** NGINX\
**Created:** [November 5, 2012, 8:45am UTC](https://www.ruby-forum.com/t/how-to-find-a-suitable-number-for-the-keepalive-connections/224247 "2012-11-05T08:45:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [November 5, 2012, 8:45am UTC](https://www.ruby-forum.com/t/how-to-find-a-suitable-number-for-the-keepalive-connections/224247/1 "2012-11-05T08:45:48Z")

</div>

The |/connections/| parameter should be set low enough(??)  
to allow upstream servers to process additional new incoming  
connections as well.

I am very confused about the keepalive  
[http://nginx.org/en/docs/http/ngx\_http\_upstream\_module.html#keepalive](http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive)  
connections in the ngx\_http\_upstream\_module,  
can somebody tell me how to determine the keepalive connections in http  
protocol ?

just like this:  
upstream http\_backend {  
server 127.0.0.1:8080;

```
keepalive 16;// why 16 ? how to determine a suitable number ?

```

}

server {  
…

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

```

}
