Repository navigation
docs: align the example configuration and docs with recent changes - #1809
Merged
Merged
Conversation
Audit the documentation, bin/config.toml and os-build/config.toml against the changes merged on main from 2026-10-01 to 2026-10-03 and fix every statement that no longer matches the code: - connection attempts (#1806): 503 and 504 answer comments in both example configurations, the TCP close on connect timeout, the front_timeout and connect_timeout rows, the access-log timeout tokens, http.503.errors, the three-attempt circuit breaker and its stale log lines in doc/debugging_strategies.md, the TCP close in the CLI help; - H2 flood protection (#1756, #1798): floor-and-ratio semantics of the RST_STREAM lifetime violation metrics, the missing window_update_stream0_window metric row, fourteen H2FloodConfig thresholds, the admin-ops worked example against the current defaults, h2.flood.stream_refused, h2_stream_refusal_percent among the listener-update fields; - health checks (#1805): health-check remove keeps the last health state, DOWN logs a warning, the fail-open citation, unlabelled health_check counters, a configure_cli.md section, the TCP-mode timeout comment; - UDP (#1746, #1770): HRW/MAGLEV key on the affinity key rather than the flow key, soft-stop closes flows at once, udp.flows.evicted reasons, per-source limits in the simulation doc; - pooled connections to a removed backend are not reused (#1743); - the h2_stream_shrink_ratio floor of 2 in the update-message comments. Documentation only, no behaviour change. Signed-off-by: Florentin Dubois <[email protected]>
FlorentinDUBOIS
added a commit
that referenced
this pull request
Oct 3, 2026
…ic-names #1809 added the `h2.flood.violation.window_update_stream0_window` row to doc/configure.md; keep its copy, drop this branch's duplicate, and drop the CHANGELOG sentence that claimed the row. Signed-off-by: Florentin Dubois <[email protected]>
FlorentinDUBOIS
added a commit
that referenced
this pull request
Oct 3, 2026
…ve-resets-backends #1809 rewrote the `health-check remove` paragraph of doc/health_checks.md to describe the behaviour #1811 fixes; keep this branch's wording (backends reset to healthy, in-flight probes dropped) and drop the clause of #1809's CHANGELOG entry that documented the old behaviour. Signed-off-by: Florentin Dubois <[email protected]>
FlorentinDUBOIS
added a commit
that referenced
this pull request
Oct 3, 2026
…s removed (#1814) ## What `sozu cluster health-check remove` now resets the backends a probe marked DOWN, as `doc/health_checks.md` already states. `Server::remove_health_check_state` only dropped the cluster from `BackendMap::health_check_configs`; it now goes through `BackendMap::set_health_check_config(cluster_id, None)`, the path `AddCluster` takes, which resets every backend of the cluster to healthy and re-emits the availability gauges. Every path that clears a health check: - `RemoveHealthCheck`: fixed (drops in-flight probes, then resets the backends). - `AddCluster` upsert without `health_check`: already reset the backends, but kept in-flight probes, whose own config copy (`record_check_result` uses `check.config`) could mark a backend DOWN after the reset. It now drops them too. - `RemoveCluster`: removes the backends outright; unchanged (the reset is a no-op on a removed cluster, `record_cluster_availability` returns early). - Master state replay: `ConfigState` holds no backend health and a fresh worker starts with healthy backends; a replayed `AddCluster` into a live worker takes the upsert path above. ## Tests - `server::remove_health_check_tests::remove_health_check_resets_a_backend_marked_down`: red without the fix (backend stays DOWN), green with it. - `server::remove_health_check_tests::add_cluster_without_health_check_resets_a_backend_marked_down`: guard for the upsert path, which already reset; red when the `set_health_check_config` call is removed from `Server::add_cluster`. - e2e `health_check_mode_tests::test_remove_health_check_restores_down_backend`: two backends, one answering 404 on the probe path but 200 on traffic; waits until it is DOWN (`health_check.down == 1`) and excluded (10 consecutive requests to the other backend), sends `RemoveHealthCheck`, then requires a response from it. Two backends because a cluster with every backend down fails open. Without the fix: `the backend marked DOWN never served traffic after RemoveHealthCheck`; with it: ok. - Not covered: dropping the in-flight probes on the upsert path (needs a live probe socket in flight). Validation: `cargo +nightly fmt --check`, `cargo +1.93.1 clippy --all-features --all-targets --locked -- -D warnings`, `cargo +1.93.1 test -p sozu-lib --lib --all-features --locked` (1588 passed), the 11 `health_check` e2e tests, the full e2e suite (`--features opentelemetry,splice,simd -- --test-threads=4`: 622 passed), `check_doc_citations.py --base origin/main`. ## Interplay with #1809 #1809 (merged) rewrote the `health-check remove` paragraph of `doc/health_checks.md` to describe the behaviour this PR fixes. The merge of origin/main keeps this PR's wording (backends reset to healthy, in-flight probes dropped) and drops the clause of #1809's CHANGELOG entry that documented the old behaviour. Fixes #1811 Signed-off-by: Florentin Dubois <[email protected]>
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.
Audit of the docs,
bin/config.tomlandos-build/config.tomlagainst everything merged onmainfrom 2026-10-01 to 2026-10-03 (43 commits, #1724 through #1808). Most of the new keys were already documented by their own PRs (max_connection_attempts,h2_stream_refusal_percent, health checkmode/accepted_statuses, the raised flood defaults, the 16 MiB connection window). This PR fixes what was still stale.bin/config.toml,os-build/config.tomlanswer commentsbin/config.tomlmax_connection_attemptsdoc/debugging_strategies.mdmax_connection_attempts(default 5),backend.connect.retries_exhausted, real TCP log levels and textdoc/configure.mdfront_timeout/connect_timeoutrowsfront_timeoutdoc/configure.mdclient_timeout_during_response,backend_timeout,http.503.errorsLIFECYCLE.mdbackend timercli.rshelp,doc/configure_cli.mddoc/configure.mdflood metricswindow_update_stream0_windowrowdoc/architecture.md,doc/h2_mux_internals.mdH2FloodConfigthresholdsh2_stream_refusal_percentdoc/configure_admin_ops.mdh2.flood.stream_refuseddoc/configure.mdglitch tuningdoc/health_checks.mdremoveresets backends to healthy; DOWN logs an error;load_balancing.rs::BackendList::healthyBackendList::select_tiersinbackends.rsdoc/metrics.mddoc/configure_cli.md--mode,--probe-timeoutvs global--timeoutcli.rs--load-balancing-policy,bin/config.toml, proto commentdoc/configure.mdudp.flows.evictedreasonsdoc/udp_simulation.mddoc/lifetime_of_a_session.mdcommand.protoupdate messagesh2_stream_shrink_ratio >= 1>= 2, as validated instate.rsmax_connection_attempts(5 by default)Reported here, not changed in this PR:
sozu cluster health-check removedoes not reset backends a probe marked DOWN (remove_health_check_stateskips the reset thatset_health_check_config(None)does), so they stay out of rotation until the cluster is added again. The doc now describes this. It looks like a code bug.sozu top's H2 pane readsh2.flood.violation.{rapid_reset,made_you_reset,ping,settings,priority,continuation}, which the detector never emits (it emitsrst_stream_pre_response_lifetime,ping_window, ...). Onlyglitch_windowmatches, andh2.flood.stream_refusedis not shown.h2_flood_detector.rscomments still refer to a 1 MiB connection window, and theh2_stream_idle_timeout_secondsproto comment says "Default: 30" where the value inheritsback_timeout.connections.rejected_per_cluster_ipis documented as also counting TCP rejections; only the HTTP 429 path increments it.Validation:
sozu config checkpasses onbin/config.toml, on a copy with every commented key under review uncommented (global and clustermax_connection_attempts, the H2 block, the health check block), and onos-build/config.tomlwith local state/socket paths. Negative controls (max_connection_attempts = 0;expected_status = 200next toaccepted_statuses) are rejected.cargo +1.93.1 test -p sozu-command-lib --all-features --locked: 235 passed.cargo +1.93.1 test -p sozu --bin sozu --locked: 124 passed (including the--load-balancing-policyhelp tests).cargo +nightly fmt --all --checkandpython3 .github/scripts/check_doc_citations.py --root . --base origin/mainare clean.