From c28e2610cfc70e89a0ffabe18356d148afe98bfc Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 31 Jan 2011 15:51:30 -0800 Subject: enable TCP_NOPUSH/TCP_CORK by default It's actually harmless since Unicorn only supports "fast" applications that do not trickle, and we don't do keepalive so we'll always flush-on-close. This should reduce wakeups on the nginx proxy server if nginx is over TCP. Mongrel 1.x had TCP_CORK enabled by default, too. --- lib/unicorn/socket_helper.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/unicorn/socket_helper.rb') diff --git a/lib/unicorn/socket_helper.rb b/lib/unicorn/socket_helper.rb index d07684a..9600b34 100644 --- a/lib/unicorn/socket_helper.rb +++ b/lib/unicorn/socket_helper.rb @@ -23,6 +23,10 @@ module Unicorn # same default value as Mongrel :backlog => 1024, + + # since we don't do keepalive, we'll always flush-on-close and + # this saves packets for everyone. + :tcp_nopush => true, } #:startdoc: -- cgit v1.2.3-24-ge0c7