Skip to content

Instantly share code, notes, and snippets.

@sawanoboly
Created November 15, 2011 10:28
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save sawanoboly/1366694 to your computer and use it in GitHub Desktop.
Save sawanoboly/1366694 to your computer and use it in GitHub Desktop.
mongos behind haproxy configuration.
global
daemon
user haproxy
group haproxy
log /dev/log daemon info
maxconn 4096
defaults
log global
option dontlognull
mode tcp
timeout connect 5000ms
timeout client 30000ms
timeout server 30000ms
retries 3
option redispatch
default-server on-error fastinter error-limit 3 inter 3000ms fastinter 1000ms downinter 300s fall 3
listen mongos
option tcplog
bind 127.0.0.1:27017
balance roundrobin
server mongos1 192.168.10.5:27017 check
server mongos2 192.168.10.6:27017 check
server mongos3 192.168.10.7:27017 check
redispatch
@taf2
Copy link

taf2 commented Nov 3, 2013

balance option should be source? see: http://comments.gmane.org/gmane.comp.db.mongodb.user/61077

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment