haproxy当主机启动后,什么时候从backup节点切换

yupeng103 2019-07-23 02:10:21
将mysql数据库使用haproxy做负载均衡,建立s1、s2两个server,其中s2为backup。
s1宕机后自动切换到s2没有问题,但是当s1又重新启动后为什么不能立马切换到s1,感觉一段时间不操作后才会走s1。
配置如下:
global
maxconn 32000
nbproc 3
daemon
defaults
mode tcp
retries 3
option abortonclose
maxconn 32000
#timeout connect 300s
#timeout client 300s
#timeout server 300s
timeout connect 10s
timeout client 10m
timeout server 10m
timeout http-keep-alive 10m
log 127.0.0.1 local0 err

listen win_ss
bind 0.0.0.0:3306
mode tcp
option mysql-check user haproxy_check
#balance source
server s1 127.0.0.1:3326 check rise 1 fall 1
server s2 127.0.0.1:3316 check rise 1 fall 1 backup

listen status
bind 0.0.0.0:1188
mode http
stats enable
stats refresh 30s
stats uri /
stats hide-version
stats admin if TRUE
...全文
63 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

5,658

社区成员

发帖
与我相关
我的任务
社区描述
Web开发应用服务器相关讨论专区
社区管理员
  • 应用服务器社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧