Created
August 28, 2014 02:17
-
-
Save davidchase/f7ea0b15d0d1a5888d14 to your computer and use it in GitHub Desktop.
haproxy.cfg example based on v1.5.3
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 | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 notice | |
log 127.0.0.1:514 local2 notice | |
maxconn 4096 | |
pidfile tmp/haproxy-queue.pid | |
defaults | |
log global | |
mode http | |
option httplog | |
option dontlognull | |
option forwardfor | |
retries 3 | |
option httpchk | |
option redispatch | |
maxconn 2000 | |
timeout connect 5000 | |
timeout client 50000 | |
timeout server 50000 | |
listen leastconn_balancer 127.0.0.1:8080 | |
mode http | |
option httplog | |
balance leastconn | |
maxconn 10000 | |
server app1 localhost:8081 | |
server app2 localhost:8082 | |
listen roundrobin_balancer localhost:8090 | |
mode http | |
option httplog | |
balance roundrobin | |
server app1 localhost:8081 | |
server app2 localhost:8082 | |
listen admin 127.0.0.1:9100 | |
mode http | |
stats hide-version | |
stats uri / | |
stats auth admin:admin123 | |
stats refresh 5s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment