From: Eric Wong <normalperson@yhbt.net>
To: mongrel-unicorn@rubyforge.org
Cc: Aaron Patterson <aaron@tenderlovemaking.com>
Subject: [PATCH 2/2] configurator: attempt to clarify :tcp_nopush/:tcp_nodelay
Date: Wed, 27 Apr 2011 14:12:42 -0700 [thread overview]
Message-ID: <1303938762-32318-3-git-send-email-normalperson@yhbt.net> (raw)
In-Reply-To: <1303938762-32318-1-git-send-email-normalperson@yhbt.net>
These options will probably be more important as interest in
streaming responses in Rails 3.1 develops.
I consider the respective defaults for Unicorn (designed to run
behind nginx) and Rainbows! (designed to run standalone) to be
the best choices in their respective environments.
---
lib/unicorn/configurator.rb | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb
index 73869de..bed3abe 100644
--- a/lib/unicorn/configurator.rb
+++ b/lib/unicorn/configurator.rb
@@ -253,24 +253,32 @@ class Unicorn::Configurator
#
# [:tcp_nodelay => true or false]
#
- # Disables Nagle's algorithm on TCP sockets if +true+
+ # Disables Nagle's algorithm on TCP sockets if +true+.
+ #
+ # Setting this to +true+ can make streaming responses in Rails 3.1
+ # appear more quickly at the cost of slightly higher bandwidth usage.
+ # The effect of this option is most visible if nginx is not used,
+ # but nginx remains highly recommended with \Unicorn.
#
# This has no effect on UNIX sockets.
#
- # Default: operating system defaults (usually Nagle's algorithm enabled)
+ # Default: +false+ (Nagle's algorithm enabled) in \Unicorn,
+ # +true+ in Rainbows!
#
# [:tcp_nopush => true or false]
#
# Enables/disables TCP_CORK in Linux or TCP_NOPUSH in FreeBSD
#
- # This is enabled by default as of Unicorn 3.4. This prevents partial
- # TCP frames from being sent out and reduces wakeups in nginx if it is
- # on a different machine. Since Unicorn is only designed for applications
- # that send the response body quickly without keepalive, sockets will
- # always be flushed on close to prevent delays.
+ # This prevents partial TCP frames from being sent out and reduces
+ # wakeups in nginx if it is on a different machine. Since \Unicorn
+ # is only designed for applications that send the response body
+ # quickly without keepalive, sockets will always be flushed on close
+ # to prevent delays.
#
# This has no effect on UNIX sockets.
#
+ # Default: +true+ in \Unicorn 3.4+, +false+ in Rainbows!
+ #
# [:tries => Integer]
#
# Times to retry binding a socket if it is already in use
--
Eric Wong
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
prev parent reply other threads:[~2011-04-27 21:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-27 18:13 Rails streaming example video Eric Wong
2011-04-27 21:12 ` [PATCH 0/2] attempting to clarify docs for streaming Eric Wong
2011-04-27 21:12 ` [PATCH 1/2] examples/nginx.conf: clarify proxy_buffering for Rails 3.1 Eric Wong
2011-04-27 21:12 ` Eric Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/unicorn/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1303938762-32318-3-git-send-email-normalperson@yhbt.net \
--to=normalperson@yhbt.net \
--cc=aaron@tenderlovemaking.com \
--cc=mongrel-unicorn@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).