HAProxy config
1 例子
global
maxconn 1000
nbproc 16
log 127.0.0.1 local0 info
log 127.0.0.1 local1 warning
pidfile /home/work/haproxy/conf/haproxy.pid
daemon
defaults
mode tcp
log global
option dontlognull
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 120m
timeout server 120m
timeout http-keep-alive 10s
timeout check 10s
listen service1
bind *:1235
mode tcp
balance roundrobin
timeout server 60m
server rs1 10.151.238.13:1235 weight 5 maxconn 4000 check inter 10s
server rs2 10.161.48.50:1235 weight 5 maxconn 4000 check inter 10s
listen service2
bind *:1236
mode tcp
balance roundrobin
timeout server 60m
server rs1 10.151.238.13:1236 weight 5 maxconn 4000 check inter 10s
server rs2 10.161.48.50:1236 weight 5 maxconn 4000 check inter 10s连接回收策略
Last updated