Created
January 29, 2011 18:56
-
-
Save seanhess/802098 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 settings | |
#--------------------------------------------------------------------- | |
global | |
log 127.0.0.1 local2 | |
chroot /var/lib/haproxy | |
pidfile /var/run/haproxy.pid | |
maxconn 4000 | |
user haproxy | |
group haproxy | |
daemon | |
#--------------------------------------------------------------------- | |
# common defaults that all the 'listen' and 'backend' sections will | |
# use if not designated in their block | |
#--------------------------------------------------------------------- | |
defaults | |
mode http | |
log global | |
option dontlognull | |
option httpclose | |
option httplog | |
option forwardfor | |
option redispatch | |
timeout connect 10000 # default 10 second time out if a backend is not found | |
timeout client 300000 | |
timeout server 300000 | |
maxconn 60000 | |
retries 3 | |
stats enable | |
#--------------------------------------------------------------------- | |
# main frontend which proxys to the backends | |
#--------------------------------------------------------------------- | |
frontend main *:80 | |
default_backend api | |
#--------------------------------------------------------------------- | |
# round robin balancing between the various backends | |
#--------------------------------------------------------------------- | |
backend api | |
balance roundrobin | |
server api1 api1:80 check | |
server api2 api2:80 check | |
server api3 api3:80 check | |
server api4 api4:80 check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment