【问题标题】:Configure HAProxy unreachable server配置 HAProxy 不可达服务器
【发布时间】: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


    【解决方案1】:

    它不会发送到死的 apache 服务器,因为 haproxy 无法连接 apache 服务器...它会检查一个 apache 是否没有响应,然后它会发送到其他节点

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多