From 9d1fe2f440b95ab75089fab077e880c3d8425ff6 Mon Sep 17 00:00:00 2001 From: "Damien F. Katz" Date: Tue, 24 Aug 2010 00:13:43 +0000 Subject: 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. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@988360 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl index bb97cb97..1504ebc9 100644 --- a/src/couchdb/couch_httpd.erl +++ b/src/couchdb/couch_httpd.erl @@ -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} -> -- cgit v1.2.3