Skip to content

Instantly share code, notes, and snippets.

@actionjack
Forked from sawanoboly/haproxy.cfg
Last active August 29, 2015 14:08
Show Gist options
  • Save actionjack/fc4c940be76a30c608a2 to your computer and use it in GitHub Desktop.
Save actionjack/fc4c940be76a30c608a2 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment