<div dir="ltr">Hi,<div><br></div><div>I have below setup:</div><div><br></div><div>client -> nginx server A  -> proxy server -> real backend server (say, nginx server B)</div><div>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. </div><div><br></div><div>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.<br></div><div><br></div><div>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?</div><div><br></div><div>Thanks!</div><div>Frank</div><div><br></div></div>