HAProxy健康检查:使用httpchk并观察?
我正在使用HAProxy 1.4.18和以下后端configuration backend staging option httpchk HEAD /check.txt HTTP/1.0 http-check disable-on-404 default-server error-limit 1 on-error mark-down server staging01 xxxx:80 check observe layer7 server staging02 xxxx:80 check observe layer7 服务器在apache / passenger上运行多个应用程序。 httpchk和disable-on-404的组合允许正常关机并且很容易地从lb中移除服务器,同时仍然能够直接访问(即用于testing)。 我试图设置观察,以便在应用程序不工作时禁用服务器。 我已经打破了staging02上的应用程序configuration,所以它总是返回一个500.在第一个500之后它被正确地标记为DOWN,但是在下一个httpchk被标记为UP。 这是日志文件: Server staging/staging02 is DOWN, reason: Health analyze, info: "Detected 1 consecutive errors, last one was: Wrong http response". 1 active […]