diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-04-27 13:49:14 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-04-27 13:49:14 -0700 |
commit | eaf72275e36560e567efc9597d929e02dc2f577d (patch) | |
tree | b5add8fbc9f4c326b3f9d9a3eb5b7d61ab3335bb | |
parent | 37c491dcc23d445521229dbe902f02833f2a0f4c (diff) | |
download | unicorn-eaf72275e36560e567efc9597d929e02dc2f577d.tar.gz |
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.
-rw-r--r-- | 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 |