From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS14383 205.234.109.0/24 X-Spam-Status: No, score=-0.5 required=5.0 tests=AWL,MSGID_FROM_MTA_HEADER, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: [PATCH 2/2] configurator: attempt to clarify :tcp_nopush/:tcp_nodelay Date: Wed, 27 Apr 2011 14:12:42 -0700 Message-ID: <1303938762-32318-3-git-send-email-normalperson@yhbt.net> References: <20110427181317.GA17625@dcvr.yhbt.net> <1303938762-32318-1-git-send-email-normalperson@yhbt.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1303939709 13396 80.91.229.12 (27 Apr 2011 21:28:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 27 Apr 2011 21:28:29 +0000 (UTC) Cc: Aaron Patterson To: mongrel-unicorn@rubyforge.org Original-X-From: mongrel-unicorn-bounces@rubyforge.org Wed Apr 27 23:28:24 2011 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org X-Mailer: git-send-email 1.7.5.rc0.117.gd2742 In-Reply-To: <1303938762-32318-1-git-send-email-normalperson@yhbt.net> X-BeenThere: mongrel-unicorn@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org Xref: news.gmane.org gmane.comp.lang.ruby.unicorn.general:929 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QFCHU-0005kW-LD for gclrug-mongrel-unicorn@m.gmane.org; Wed, 27 Apr 2011 23:28:20 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id E3CFC18583A7; Wed, 27 Apr 2011 17:28:19 -0400 (EDT) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id 04F66185834E for ; Wed, 27 Apr 2011 17:13:07 -0400 (EDT) Received: from localhost (unknown [127.0.2.5]) by dcvr.yhbt.net (Postfix) with ESMTP id 5B8151FD5A; Wed, 27 Apr 2011 21:13:07 +0000 (UTC) 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