<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Nov 3, 2012, at 9:02 , howard chen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><h1 style="border-right:inherit;color:rgb(34,34,34);background:inherit;font-size:18px;margin:12px 1px 9px 0px;font-family:arial,sans-serif;font-weight:normal;padding:0px 0px 0px 8px">
<span style="font-size:13px;background-color:rgb(255,255,255)">From the doc:</span><span style="font-size:13px;background-color:rgb(255,255,255)"> </span><a href="http://wiki.nginx.org/ReadMoreAboutTcpNodelay" target="_blank" style="color:rgb(17,85,204);font-size:13px;background-color:rgb(255,255,255)">http://wiki.nginx.org/ReadMoreAboutTcpNodelay</a><br style="font-size:13px;background-color:rgb(255,255,255)">
<br style="font-size:13px;background-color:rgb(255,255,255)"><blockquote style="font-size: 13px; background-color: rgb(255, 255, 255); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; position: static; z-index: auto; ">TCP_NODELAY is for a specific purpose; to disable the Nagle buffering algorithm. It should only be set for applications that send frequent small bursts of information without getting an immediate response, where timely delivery of data is required (the canonical example is mouse movements).</blockquote>
<br style="font-size:13px;background-color:rgb(255,255,255)"><br style="font-size:13px;background-color:rgb(255,255,255)"><br style="font-size:13px;background-color:rgb(255,255,255)"><span style="font-size:13px;background-color:rgb(255,255,255)">So my understanding for most web app, it should be disabled so we can use the "Nagle buffering algorithm", only disable when you have special need, like logging mouse movements as in the example?</span></h1></blockquote><a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#tcp_nodelay">http://nginx.org/en/docs/http/ngx_http_core_module.html#tcp_nodelay</a></div><div><br></div><div> The option is enabled only when a connection is transitioned into the
keep-alive state. </div><div><br></div><div>Otherwise there is 100ms delay when nginx sends response tail in the last incomplete TCP packet.</div><div><br><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br class="Apple-interchange-newline">--<br>Igor Sysoev<br></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Georgia; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><a href="http://nginx.com/support.html">http://nginx.com/support.html</a></span></div>
</div>
<br></div></body></html>