Created
January 15, 2014 09:29
-
-
Save kenshinx/8433294 to your computer and use it in GitHub Desktop.
Haproxy load balance. haproxy:123.125.22.97 server1:123.125.22.99
server2:123.125.22.100
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
# this config needs haproxy-1.1.28 or haproxy-1.2.1 | |
global | |
log 127.0.0.1 local3 debug | |
#log 127.0.0.1 local1 notice | |
#log loghost local0 info | |
maxconn 65535 | |
#chroot /usr/share/haproxy | |
user haproxy | |
group haproxy | |
daemon | |
nbproc 1 | |
pidfile /var/run/haproxy.pid | |
#debug | |
#quiet | |
defaults | |
log global | |
mode http | |
option httplog | |
option dontlognull | |
retries 3 | |
redispatch | |
stats enable | |
stats uri /haproxy-status | |
stats refresh 5s | |
maxconn 2000 | |
contimeout 5000 | |
clitimeout 50000 | |
srvtimeout 50000 | |
listen swaf-loadbalance 0.0.0.0:80 | |
cookie SERVERID rewrite | |
balance roundrobin | |
server swaf_99 123.125.22.99:80 cookie app1inst1 check inter 2000 rise 2 fall 5 | |
server sawf_100 123.125.22.100:80 cookie app1inst2 check inter 2000 rise 2 fall 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
haproxy:123.125.22.97
server1:123.125.22.99
server2:123.125.22.100