summaryrefslogtreecommitdiff
path: root/puppet/modules/site_webapp
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-04-09 14:04:25 -0400
committerMicah Anderson <micah@riseup.net>2013-04-09 14:04:25 -0400
commit994c0212e86c60fa0f83c379308618b901d240c1 (patch)
tree32d487dd43f8ad6593d5ff476a2d07f186b0ac47 /puppet/modules/site_webapp
parent5e7faed43cf72e2546334da432fcd90e0d558502 (diff)
add a httpchk line to haproxy to properly test if the couchdb is available
add the useful http-server-close option set check option on the servers, with a 3 second interval, a one second fastinter (for flapping) and a one second downinter. Set the number of checks for failure to be one (so it will take 3 seconds for a node to fail out) and 2 checks to come back
Diffstat (limited to 'puppet/modules/site_webapp')
-rw-r--r--puppet/modules/site_webapp/templates/haproxy_couchdb.cfg.erb8
1 files changed, 4 insertions, 4 deletions
diff --git a/puppet/modules/site_webapp/templates/haproxy_couchdb.cfg.erb b/puppet/modules/site_webapp/templates/haproxy_couchdb.cfg.erb
index a9bdb923..f08161ee 100644
--- a/puppet/modules/site_webapp/templates/haproxy_couchdb.cfg.erb
+++ b/puppet/modules/site_webapp/templates/haproxy_couchdb.cfg.erb
@@ -2,14 +2,14 @@
listen bigcouch-in
mode http
balance roundrobin
-
option httplog
option dontlognull
- option tcplog
-
+ option httpchk GET /
+ option http-server-close
+
bind localhost:4096
<% for port in @local_ports -%>
- server couchdb_<%=port%> localhost:<%=port%>
+ server couchdb_<%=port%> localhost:<%=port%> check inter 3000 fastinter 1000 downinter 1000 rise 2 fall 1
<% end -%>