【发布时间】:2015-08-25 22:25:29
【问题描述】:
如果我将 HAProxy 配置为使用“检查”选项对 3 个后端 apache 服务器进行负载平衡,以下示例来自网络,并且我提前知道这些服务器中至少有一个无法联系(我不会提前知道是哪一个)。 HAProxy 会在它发现它已经死之前尝试向这个可能死的服务器发送用户请求还是会“检查”选项确保没有用户请求去那里
backend nodes
mode http
balance roundrobin
option forwardfor
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https if { ssl_fc }
option httpchk HEAD / HTTP/1.1\r\nHost:localhost
server web01 1.1.1.1:9000 check
server web02 1.1.1.2:9000 check
server web03 1.1.1.3:9000 check
谢谢
【问题讨论】:
标签: apache web load-balancing haproxy high-availability