# Keep-alive confused

**URL:** <https://www.ruby-forum.com/t/keep-alive-confused/234190>\
**Category:** NGINX\
**Created:** [February 13, 2015, 7:56am UTC](https://www.ruby-forum.com/t/keep-alive-confused/234190 "2015-02-13T07:56:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [February 13, 2015, 7:56am UTC](https://www.ruby-forum.com/t/keep-alive-confused/234190/1 "2015-02-13T07:56:24Z")

</div>

hello,

```
 I use nginx as a reverse proxy, and I find a question that confused 

```

me.

```
 In upstream loction I use keepalive direction to keep a connection 

```

pool. As everyone knows,  
that can reduse tcp handshake cost. When I send request with  
“Connection: keep-alive” header  
using http /1.0 protocal to nginx, I find nginx transmits the request to  
backend with “Connection: close”  
header. You know, “Connection: close” header will lead backend close the  
connection, and keepalive  
direction cannt work.

for example below:  
////////////////////////////////////////////////////////////////////////////////////////////////////////////////  
GET  
/2/proxyauth/auth.json?source=84883&&access\_token=2.00JGc2QCCPl5PDe1e566dDfAD&object\_id=1022:100101B2094650D064A0F5469D&uid=1042:2673106753&auth\_type=option  
HTTP/1.0  
Connection: keep-alive  
Client-Uri:  
/2/proxy/darwin/movie/mblog\_list.json?source=848343583&&access\_token=2.00JGc2QCCPl5PDe1e566d3b9NzDfAD&object\_id=1022:100101B2094650D064A0F5469D&uid=1042:2673106753  
Client-Host: localhost  
Host: oauthweibo  
User-Agent: curl/7.22.0 (x86\_64-pc-linux-gnu) libcurl/7.22.0  
OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3  
Accept: _/_

HTTP/1.1 200 OK  
Server: nginx/1.6.2  
Date: Fri, 13 Feb 2015 06:47:39 GMT  
Content-Type: application/json;charset=UTF-8  
Connection: close  
Api-Server-IP: 10.75.25.127  
Vary: Accept-Encoding  
/////////////////////////////////////////////////////////////////////////////////////

```
 Anybody meet that problem? Ideas anyone? thanks very much.

 When nginx transmits requests to backend, it uses http /1.0 

```

protocal. Why is that?

```
 Thanks.
```

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 13, 2015, 2:02pm UTC](https://www.ruby-forum.com/t/keep-alive-confused/234190/2 "2015-02-13T14:02:33Z")

</div>

Hello!

On Fri, Feb 13, 2015 at 02:55:38PM +0800, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> for example below:  
> HTTP/1.1 200 OK  
> When nginx transmits requests to backend, it uses http /1.0 protocal. Why  
> is that?  
> [Module ngx\_http\_upstream\_module](http://nginx.org/r/keepalive)

–  
Maxim D.

> **[nginx](http://nginx.org/)**
