Welcome! Log In Create A New Profile

Advanced

ignore "connection: close" from upstream

Frank Liu
September 14, 2015 04:50PM
Hi,

I have below setup:

client -> nginx server A -> proxy server -> real backend server (say,
nginx server B)
I'd like to have the keepalive connection between nginx server A and proxy
server never die. The problem is sometimes the real backend server sends a
"Connection: close". For example, I know if nginx is used as the real
backend server, it will by default send "Connection: close" after 100
requests. When proxy server passes that response to nginx A, nginx will
drop the keepalive link.

Since I don't have control over the real backend server, my question is
whether it is possible to configure nginx A to ignore the upstream
"connection: close" and keep the link alive? Does nginx A have to pass the
"Connection: close" to client? I thought nginx and client manage the
keepalive separately instead of relying on upstream keepalive.

I have control over the proxy server, so I could add a "X-My-Connection:
close" or "X-My-Connection: keep-alive" to manage the connections between
nginx server A and proxy server. Can nginx be configured to honor the
customer header so that we don't be affected by the real backend server?

Thanks!
Frank
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

ignore "connection: close" from upstream

Frank Liu September 14, 2015 04:50PM

Re: ignore "connection: close" from upstream

Francis Daly September 15, 2015 04:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 137
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready