<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 30, 2016 at 9:24 AM, Grant <span dir="ltr"><<a href="mailto:emailgrant@gmail.com" target="_blank">emailgrant@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> By default the Connection header is passed to the origin. If a client sends<br>
> a request with Connection: close, Nginx would send this to the upstream,<br>
> effectively disabling keepalive. By clearing this header, Nginx will not<br>
> send it on to the upstream source, leaving it to send its own Connection<br>
> header as appropriate.<br>
<br>
<br>
That makes perfect sense. Is there a way to test if keepalive is<br>
active between nginx and the upstream server?<br>
<br>
- Grant<br></blockquote><div><br></div><div>A few quick thoughts come to mind:</div><div><br></div><div>- tcpdump traffic between nginx and upstream (this seems like the best way to verify given that keepalive behavior directly affects tcp traffic, so you want to examine this directly)</div><div>- examine nginx debug logs to show what headers are being passed to / received from upstream (requires your nginx to be built with --with-debug)</div><div>- query kernel for status of tcp connections while simulating traffic between nginx and upstream (eg netstat, ss, etc)</div></div><br></div></div>