Repository navigation
feat(health-check): probe a port other than the backend data port - #1899
Merged
Merged
Conversation
HealthCheckConfig gains an optional probe port (tag 9). When set, HTTP and TCP probes dial the backend's IP with that port, and the HTTP probe names the probed address in Host (h2c :authority). Unset keeps today's behaviour; a peer that predates the field ignores it. UDP clusters already have UdpHealthConfig.tcp_port. Validation bounds the port to 1..=65535. The TOML file config, the CLI (cluster health-check set --port), the health-check list output and the docs carry it. Signed-off-by: Florentin Dubois <[email protected]>
This was referenced Oct 15, 2026
FlorentinDUBOIS
marked this pull request as ready for review
October 15, 2026 21:10
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HealthCheckConfiggains an optional probeport(protobuf field 9). HTTP and TCP health checks use that port with the backend IP address while ordinary traffic keeps using the backend data endpoint. HTTPHost, h2c:authorityand probe logs all use the effective probe address.The field is optional: unset keeps the existing behavior. The public Rust
HealthCheckConfigandFileHealthCheckConfigstructures gain the corresponding optional field, so exhaustive literals must initialize it.Behavior
1..=65535through TOML, protobuf state andcluster health-check set --port.health-check list, withdatawhen the override is unset.connect_backend(probe_address, unix_path)so the port override reaches IP backends and a UNIX backend still uses its socket.health_check.porttogether with aunix_pathbackend before mutation in file configuration,ConfigStateand workers, whichever order introduces the conflict.ConfigState::diff, static reload and SaveState/LoadState. Only the conflictingAddClusteris deferred until the backend replacement has completed.AddClusterwithout one, still resets health state as documented.Mixed-version compatibility
The port travels on existing
AddClusterandSetHealthCheckmessages. A worker older than 2.3.2 can decode the message, ignore field 9 and probe the data port. Upgrade the main process and every worker to 2.3.2 before enablinghealth_check.port.The request verbs introduced for header routing,
silent_closeand UNIX backends retain their fail-closed old-worker behavior.Validation
ConfigState::diff, static reload and SaveState/LoadState, including the reverse direction.AddClusterwith a probe port keeps an unhealthy backend and its failure counters unchanged.cargo build --workspace --all-targets --locked.cargo clippy -p sozu -p sozu-command-lib --all-targets -- -D warnings.cargo +nightly fmt --all -- --check,git diff --check, and the documentation citation checker against the PR base.An independent final review of the complete integrated source returned
CLEAN.