简体   繁体   中英

why between nginx/nginx upstream use http/1.0?

I have 3 server: A(nginx)-->B(nginx)-->C(nodejs),

When i access A or B,chrome use http/1.1+keepalive by default.

I do not set "proxy_http_version 1.1;" and proxy_set_header Connection "";

But between A and B,NGINX use http/1.0 by default。That is like:

client --> nginxA(upstream to b) --> nginxB(upstream to c) --> C (nodejs)

http/1.1 --> http/1.0 --> http/1.1 --> nodejs

My questions is : why nginx use http/1.1 for upstream by default,between nginx and nginx, upstream use http/1.0 ?

THX.

Nginx since version 1.1.4 supports HTTP/1.1 when connecting to upstream servers. You just need to set configuration parameter proxy_http_version 1.1 (1.0 is the default value). see http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_http_version

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM