alibaba/tengine — pull request #553 by BrytonLee (2014-12-06 15:51:05+00:00)
Title: add  TCP SO_KEEPALIVE support for HTTP upstream.

Add TCP SO_KEEPALIVE support for HTTP upstream.

test conf:
......
upstream backend {
server www.baidu.com;

keepalive 16; #optional.
so_keepalive tcp_keepidle=3 tcp_keepintvl=3 tcp_keepcnt=3;
}
...........
location ^~/index.html {
proxy_pass http://backend/;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host www.baidu.com;
}