Skip to content

Instantly share code, notes, and snippets.

@BenHall
Created April 3, 2010 13:14
Show Gist options
  • Save BenHall/354469 to your computer and use it in GitHub Desktop.
Save BenHall/354469 to your computer and use it in GitHub Desktop.
HAProxy and CouchDB
# this config needs haproxy-1.1.28 or haproxy-1.2.1
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#log loghost local0 info
maxconn 4096
#chroot /usr/share/haproxy
user haproxy
group haproxy
daemon
#debug
#quiet
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000
listen couchdb 0.0.0.0:5000
server couchdb1 couchdb1:5984 check
server couchdb2 couchdb2:5984 check
listen stats 0.0.0.0:5100
mode http
stats uri /
stats auth admin:password
listen couchdb 0.0.0.0:5000
balance roundrobin
server couchdb1 couchdb1:5984 check
server couchdb2 couchdb2:5984 check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment