Skip to content

Instantly share code, notes, and snippets.

@VvanGemert
Created June 1, 2017 13:15
Show Gist options
  • Save VvanGemert/ec681f12c51e25968c61172814bfc23e to your computer and use it in GitHub Desktop.
Save VvanGemert/ec681f12c51e25968c61172814bfc23e to your computer and use it in GitHub Desktop.
MongoDB Haproxy configuration
listen mongodb *:27017
balance source
mode tcp
option tcpka
option httpchk
server db01 127.0.0.1:27017 check port 27020 inter 5s
server db02 127.0.0.2:27017 check port 27020 inter 5s
server db03 127.0.0.3:27017 check port 27020 inter 5s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment