From 994c0212e86c60fa0f83c379308618b901d240c1 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 9 Apr 2013 14:04:25 -0400 Subject: 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 --- puppet/modules/site_webapp/templates/haproxy_couchdb.cfg.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'puppet') 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 -%> -- cgit v1.2.3