Skip to content

Instantly share code, notes, and snippets.

@BenHall
Created April 3, 2010 13:14
Show Gist options
  • Select an option

  • Save BenHall/354469 to your computer and use it in GitHub Desktop.

Select an option

Save BenHall/354469 to your computer and use it in GitHub Desktop.

Revisions

  1. BenHall revised this gist Apr 3, 2010. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions roundrobin
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    listen couchdb 0.0.0.0:5000
    balance roundrobin
    server couchdb1 couchdb1:5984 check
    server couchdb2 couchdb2:5984 check
  2. BenHall created this gist Apr 3, 2010.
    34 changes: 34 additions & 0 deletions couchbalanced
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    # 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