haproxy专题学习
# cat haproxy.cfgglobal
log 127.0.0.1 local0
log 127.0.0.1local1 notice
#log loghost local0 info
maxconn 4096
#chroot /home/haproxy
uid 99
gid 99
daemon
nbproc 1
pidfile /tmp/haproxy.pid
# #debug
# #quiet
#
defaults
log 127.0.0.1 local3
mode http
optionhttplog
optionhttpclose
optiondontlognull
optionforwardfor
optionredispatch
retries 2
maxconn 2000
balance roundrobin
#cookie SERVERID insert indirect
cookie JESSIONID prefix
stats enable
stats uri /haproxy-stats
contimeout 5000
clitimeout 50000
srvtimeout 50000
#
listenhttp_proxy 0.0.0.0:80
#optionhttpchk GET /ping.jsp
#
# #server s2 192.168.0.102:8080 weight 3 check
server s3 192.168.1.35:80 cookie app1 weight 1 check inter 2000 rise 2 fall 5
server s1 192.168.1.166:80 cookie app2 weight 1 check inter 2000 rise 2 fall 5
页:
[1]