Last active
August 29, 2015 14:03
-
-
Save jayjanssen/a9abc88f7cc65a822552 to your computer and use it in GitHub Desktop.
aws haproxy
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 local2 | |
chroot /var/lib/haproxy | |
pidfile /var/run/haproxy.pid | |
maxconn 4000 | |
user haproxy | |
group haproxy | |
daemon | |
# turn on stats unix socket | |
stats socket /var/lib/haproxy/stats | |
defaults | |
mode tcp | |
log global | |
option httplog | |
option httpchk | |
option dontlognull | |
option http-server-close | |
option forwardfor except 127.0.0.0/8 | |
option redispatch | |
retries 3 | |
timeout http-request 10s | |
timeout queue 1m | |
timeout connect 10s | |
timeout client 1m | |
timeout server 1m | |
timeout http-keep-alive 10s | |
timeout check 10s | |
maxconn 3000 | |
# Stats interface | |
listen lb_stats *:9999 | |
mode http | |
balance roundrobin | |
stats uri / | |
stats realm "HAProxy Stats" | |
listen cluster *:5306 | |
balance roundrobin | |
server node1 ec2-54-193-180-66.us-west-1.compute.amazonaws.com:3306 check port 9200 | |
server node2 ec2-54-176-50-248.us-west-1.compute.amazonaws.com:3306 check port 9200 | |
server node3 ec2-54-176-107-250.us-west-1.compute.amazonaws.com:3306 check port 9200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment