]> git.kaiwu.me - haproxy.git/commit
REGTESTS: checks: test the health adjusting from observed traffic
authorWilly Tarreau <w@1wt.eu>
Tue, 22 Sep 2026 03:42:05 +0000 (03:42 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 15:19:30 +0000 (17:19 +0200)
commita51f87d332a06ea34c683d618c51af5ecf996a95
tree51a400d60d1594538e8aabf8465cc268052ff602
parent6d1a0c331d176bb28608673e642db67ac4fdfc92
REGTESTS: checks: test the health adjusting from observed traffic

The "observe", "error-limit" and "on-error" server settings had no
coverage. They adjust the health of a server from the traffic it serves
rather than from the health checks, which makes them testable without
any timer: the state changes exactly when the configured number of
consecutive errors has been served.

The test checks that a 404 is not counted as a layer 7 error while a
500 is, that the server is marked down once the error limit is reached
and that the backend then answers 503, and that a failed connection is
enough in layer 4 mode. It also verifies that the resulting state
change is attributed to the health analysis and not to a check result.

The health checks are directed at a second haproxy instance which
accepts the connections and never answers, with "option httpchk" so
that no check can complete and interfere with the observation.
reg-tests/checks/observe_error_limit.vtc [new file with mode: 0644]