Skip to content

Instantly share code, notes, and snippets.

@tnine
Created June 20, 2011 04:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tnine/0e8dba64b2008473c408 to your computer and use it in GitHub Desktop.
Save tnine/0e8dba64b2008473c408 to your computer and use it in GitHub Desktop.
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#log loghost local0 info
maxconn 4096
#debug
#quiet
user haproxy
group haproxy
defaults
log global
mode http
option dontlognull
option redispatch
retries 3
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000
# Set up application listeners here.
listen logbookapp 0.0.0.0:80
balance leastconn
#Make sure the aviator app has been loaded
option httpchk /aviator/home
option httplog
option forwardfor
log global
cookie SERVERID insert nocache indirect
server test-app-west-1 10.168.157.174:8080 cookie test-app-west-1 weight 1 maxconn 300 check
server test-app-west-2 10.168.118.166:8080 cookie test-app-west-2 weight 1 maxconn 300 check
server test-app-west-3 10.168.161.235:8080 cookie test-app-west-3 weight 1 maxconn 300 check
server deadbug 10.168.118.166:81 backup
listen iridium 0.0.0.0:1000
balance leastconn
mode tcp
option tcplog
server test-app-west-1 10.168.157.174:10001 weight 1 maxconn 15 check inter 10000
server test-app-west-2 10.168.118.166:10001 weight 1 maxconn 15 check inter 10000
server test-app-west-3 10.168.161.235:10001 weight 1 maxconn 15 check inter 10000
#check inter 10000
#Listener for admin interface
listen admin 0.0.0.0:22002
mode http
stats uri /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment