gpt4 book ai didi

apache - HAProxy 检查 2 个端口上的后端

转载 作者:行者123 更新时间:2023-11-28 23:28:50 24 4
gpt4 key购买 nike

我们在tomcat前面有apache。碰巧 tomcat 崩溃了,而 apache 仍然为网页提供 503 页面。有一种方法,通过 HAProxy 检查两个端口:80 和 8080,然后启动节点?我添加了 http-check expect rstatus (2|3)[0-9][0-9]http-check expect ! rstatus ^5 但是当 apache 提供服务时,这两个都没有检测到 tomcat 无法访问。

非常感谢尼克

最佳答案

如果您的健康检查配置正确,则不必测试两个端口——只需使用 option httpchk 将健康检查配置为向将由 tomcat 提供服务的 apache 发送请求。 . 503 响应将导致该服务器被宣布为不健康。

关于apache - HAProxy 检查 2 个端口上的后端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33538332/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com