Last active
August 29, 2015 14:00
-
-
Save taka-wang/11106308 to your computer and use it in GitHub Desktop.
haproxy load balancer for node.js application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
log 127.0.0.1 local0 notice | |
maxconn 2000 | |
user haproxy | |
group haproxy | |
defaults | |
log global | |
mode http | |
option dontlognull | |
retries 3 | |
option redispatch | |
timeout connect 5000 | |
timeout client 10000 | |
timeout server 10000 | |
listen app_name 0.0.0.0:9000 | |
mode http | |
stats enable | |
stats uri /haproxy?stats | |
stats realm Strictly\ Private | |
stats auth user:password | |
balance roundrobin | |
option httpclose | |
option forwardfor | |
server node1 0.0.0.0:9001 check | |
server node2 0.0.0.0:9002 check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
listen _tcp :9009 | |
mode tcp | |
balance leastconn | |
timeout server 3600000 | |
server tcp_server 0.0.0.0:80 check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment