使用haproxy给mail server做负载均衡
时间:2015-01-17 01:09来源:linux.it.net.cn 作者:IT
conf文件如下
-
-
global
-
chroot /usr/local/haproxy
-
daemon
-
nbproc 1
-
group nobody
-
user nobody
-
pidfile /usr/local/haproxy/logs/haproxy.pid
-
ulimit-n 65536
-
-
-
-
-
-
defaults
-
mode tcp
-
retries 3
-
option redispatch
-
option abortonclose
-
maxconn 32000
-
timeout connect 5000ms
-
timeout client 30000ms
-
timeout server 30000ms
-
-
log 127.0.0.1 local0 err
-
-
-
listen smtp 192.168.1.68:25
-
-
mode tcp
-
balance roundrobin
-
server s1 192.168.1.118:25 weight 1 maxconn 10000 check inter 10s
-
server s2 192.168.1.240:25 weight 1 maxconn 10000 check inter 10s
-
-
-
listen pop3 192.168.1.68:110
-
-
mode tcp
-
balance roundrobin
-
server s1 192.168.1.118:110 weight 1 maxconn 10000 check inter 10s
-
server s2 192.168.1.240:110 weight 1 maxconn 10000 check inter 10s
-
-
-
listen imap 192.168.1.68:143
-
-
mode tcp
-
balance roundrobin
-
server s1 192.168.1.118:143 weight 1 maxconn 10000 check inter 10s
-
server s2 192.168.1.240:143 weight 1 maxconn 10000 check inter 10s
-
-
-
listen admin_stats 192.168.1.68:8099
-
-
mode http
-
option httplog
-
-
maxconn 5
-
stats refresh 30s
-
stats uri /stats
-
stats realm XingCloud\ Haproxy
-
stats auth admin:admin
-
stats hide-version
-
(责任编辑:IT) |
------分隔线----------------------------