Forum: NGINX Why tcp_nodelay default to on?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
286aad049402973eec17404e3ac1b758?d=identicon&s=25 howard chen (Guest)
on 2012-11-03 06:02
(Received via mailing list)
From the doc: http://wiki.nginx.org/ReadMoreAboutTcpNodelay

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).




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?

Thanks.
0f7a1240e82f744c6c607fa7081b99f7?d=identicon&s=25 Igor Sysoev (Guest)
on 2012-11-03 06:10
(Received via mailing list)
On Nov 3, 2012, at 9:02 , howard chen wrote:

> From the doc: http://wiki.nginx.org/ReadMoreAboutTcpNodelay
>
> 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).
>
>
>
> 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?
>
http://nginx.org/en/docs/http/ngx_http_core_module...

    The option is enabled only when a connection is transitioned into
the keep-alive state.

Otherwise there is 100ms delay when nginx sends response tail in the
last incomplete TCP packet.
This topic is locked and can not be replied to.