Before version 1.29.7, NGINX used HTTP/1.0 by default for connecting to HTTP upstream servers. This older version of the protocol does not have the capability of HTTP persistent connections, commonly known as “keep-alive.”
Keep-alive reduces the number of handshakes, reduces latency, and reduces time to first byte for most regular web applications. In order to enable HTTP/1.1 and switch on the keep-alive behavior for upstream servers, operators added several directives in their configuration files. In many cases, this was forgotten, and multiple parts of web applications ended up working slower than expected.
Commonly used configuration snippet:
proxy_http_version 1.1;
proxy_set_header Connection "";
With version 1.29.7, released in March 2026, we changed the default behavior of HTTP proxying to use HTTP/1.1 with keep-alive.
The above-mentioned configuration lines are now no longer needed.
Downgrading upstream connections to HTTP/1.0
If your backend servers specifically require HTTP/1.0, you can use the following configuration lines in the relevant location contexts:
proxy_http_version 1.0;
proxy_set_header Connection "Close";
New keepalive directive parameter “local”
When the same upstream block is referenced across multiple locations or server blocks, requests from those different locations may be multiplexed over a single TCP connection to the upstream.
This behavior is controlled by the “local” parameter of the keepalive directive in the upstream context.
Due to backwards compatibility with previous NGINX versions, the default behavior of this parameter is not obvious. Please read through the following three options:
1. Default behavior when no keepalive directive is present: cached upstream connections are not shared between locations.
2. Behavior when the keepalive directive is present without the “local” parameter: cached upstream connections are shared between locations. This behavior is consistent with previous versions of NGINX:
upstream your-upstream-name {
keepalive 32;
....
}
3. Behavior when the keepalive directive is present with the “local” parameter: this is the most explicit setting, with a predictable outcome.
upstream your-upstream-name {
keepalive 32 local;
....
}
Refer to the official documentation for more details:
– https://nginx.org/en/docs/http/ngx_http_proxy_module.html
– https://nginx.org/en/docs/http/ngx_http_upstream_module.html
Use the “Discussions” section of our official repository for feedback: https://github.com/nginx/nginx/discussions
Follow the upcoming code changes and development conversations: https://github.com/nginx/nginx/pulls


