summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien F. Katz <damien@apache.org>2010-08-24 00:13:43 +0000
committerDamien F. Katz <damien@apache.org>2010-08-24 00:13:43 +0000
commit9d1fe2f440b95ab75089fab077e880c3d8425ff6 (patch)
tree3e582b9bd6caa8df2c558aacd53b981a0147b499
parent059e5f4d9979e9fcc31dc8671f8744e2af8fe7c0 (diff)
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
-rw-r--r--src/couchdb/couch_httpd.erl5
1 files 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} ->