about summary refs log tree commit homepage
path: root/lib/rainbows.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-07-21 23:27:18 +0000
committerEric Wong <normalperson@yhbt.net>2011-07-21 23:27:18 +0000
commit1e57c4c846ba9a3b736078b860583b0e7dd33d6c (patch)
treedd8a87cfae758874ea952e5c637efd47837f160c /lib/rainbows.rb
parent175727bc349ec0f7b94b4de936c7e9de1aaffd2d (diff)
downloadrainbows-1e57c4c846ba9a3b736078b860583b0e7dd33d6c.tar.gz
Unicorn 4.x already defaults match those of Rainbows!
to favor lower latency instead of lowered bandwidth
usage.
Diffstat (limited to 'lib/rainbows.rb')
-rw-r--r--lib/rainbows.rb15
1 files changed, 2 insertions, 13 deletions
diff --git a/lib/rainbows.rb b/lib/rainbows.rb
index 84604b2..3bf7717 100644
--- a/lib/rainbows.rb
+++ b/lib/rainbows.rb
@@ -1,19 +1,8 @@
 # -*- encoding: binary -*-
 require 'kgio'
 require 'unicorn'
-Unicorn::SocketHelper::DEFAULTS.merge!({
-  # the value passed to TCP_DEFER_ACCEPT actually matters in Linux 2.6.32+
-  :tcp_defer_accept => 60,
-
-  # keep-alive performance sucks without this due to
-  # write(headers)-write(body)-read
-  # because we always write headers and bodies with two calls
-  :tcp_nodelay => true,
-
-  # we always want to send our headers out ASAP since Rainbows!
-  # is designed for apps that could trickle out the body slowly
-  :tcp_nopush => false,
-})
+# the value passed to TCP_DEFER_ACCEPT actually matters in Linux 2.6.32+
+Unicorn::SocketHelper::DEFAULTS[:tcp_defer_accept] = 60
 
 # See http://rainbows.rubyforge.org/ for documentation
 module Rainbows