You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2010/08/24 02:13:43 UTC

svn commit: r988360 - /couchdb/trunk/src/couchdb/couch_httpd.erl

Author: damien
Date: Tue Aug 24 00:13:43 2010
New Revision: 988360

URL: http://svn.apache.org/viewvc?rev=988360&view=rev
Log:
Added configurable nodelay setting via the ini. Set [httpd] nodelay=true to enable the TCP_NODELAY option for the web server sockets, which means that even small amounts of data will be sent immediately.

Modified:
    couchdb/trunk/src/couchdb/couch_httpd.erl

Modified: couchdb/trunk/src/couchdb/couch_httpd.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd.erl?rev=988360&r1=988359&r2=988360&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd.erl Tue Aug 24 00:13:43 2010
@@ -56,7 +56,7 @@ start_link(Name, Options) ->
     % will restart us and then we will pick up the new settings.
 
     BindAddress = couch_config:get("httpd", "bind_address", any),
-    %% MaxConnections = couch_config:get("httpd", "max_connections", "2048"),
+    NoDelay = "true" == couch_config:get("httpd", "nodelay", "false"),
 
     DefaultSpec = "{couch_httpd_db, handle_request}",
     DefaultFun = make_arity_1_fun(
@@ -92,7 +92,8 @@ start_link(Name, Options) ->
     {ok, Pid} = case mochiweb_http:start(Options ++ [
         {loop, Loop},
         {name, Name},
-        {ip, BindAddress}
+        {ip, BindAddress},
+        {nodelay,NoDelay}
     ]) of
     {ok, MochiPid} -> {ok, MochiPid};
     {error, Reason} ->