Haproxy 线上配置文档
2012-03-28 15:10:59
标签:linux 负载均衡 休闲 haproxy 职场
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://dngood.blog.51cto.com/446195/819411
Haproxy 某项目线上配置文档
$ cat /usr/local/haproxy/haproxy.cfg
global
maxconn 32000
pidfile /usr/local/haproxy/haproxy.pid
chroot /usr/local/haproxy
uid 504
gid 504
daemon
quiet
nbproc 1
defaults
log global
mode http
option httplog
option dontlognull
retries 3
#option redispatch
maxconn 10000
contimeout 5000
clitimeout 50000
srvtimeout 50000
listen tongji 0.0.0.0:80
mode http
option httplog
option dontlognull
cookie SERVERID
balance roundrobin
option httpchk HEAD /check.html HTTP/1.0
option forwardfor
stats uri /haproxy_stats_url
stats auth admin:password
errorfile 502 /usr/local/haproxy/html/maintain.html
errorfile 503 /usr/local/haproxy/html/maintain.html
errorfile 504 /usr/local/haproxy/html/maintain.html
server city01 10.10.100.61 cookie city01 check inter 2000 rise 2 fall 3
server city02 10.10.100.62 cookie city02 check inter 2000 rise 2 fall 3
详细解释,请参考这里。
http://dngood.blog.51cto.com/446195/738634
本文出自 “dongnan” 博客,请务必保留此出处http://dngood.blog.51cto.com/446195/819411
阅读(940) | 评论(0) | 转发(0) |