perf(net): reduce health-check probe and reconfiguration overhead - #745
Open
Patrick W. Healy (phealy) wants to merge 3 commits into
Open
Patrick W. Healy (phealy) wants to merge 3 commits into
Patrick W. Healy (phealy) wants to merge 3 commits into
Conversation
This was referenced Sep 16, 2026
Patrick W. Healy (phealy)
added this pull request to stack #730
September 16, 2026 20:13
This was referenced Sep 16, 2026
This was referenced Sep 16, 2026
Patrick W. Healy (phealy)
force-pushed
the
phealy/net-healthcheck-efficiency
branch
from
September 17, 2026 19:16
44f49cc to
4e21ec9
Compare
Patrick W. Healy (phealy)
force-pushed
the
phealy/net-healthcheck-efficiency
branch
2 times, most recently
from
September 17, 2026 21:01
c733943 to
f93829f
Compare
Patrick W. Healy (phealy)
force-pushed
the
phealy/net-healthcheck-efficiency
branch
from
September 17, 2026 21:15
f93829f to
1eaf3f5
Compare
Copilot started reviewing on behalf of
Cameron Childress (cchildress)
September 18, 2026 20:06
View session
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Successive reconfigurations can retain stale detection grace beyond the current settings, and public reference documentation remains inconsistent.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Reduces network health-check overhead while preserving live session state during reconfiguration.
Changes:
- Raises default probe intervals to 15s and phases probe scheduling.
- Applies profile updates to active sessions with validation and fallback handling.
- Updates tests, CLI help, API descriptions, CRDs, and documentation.
File summaries
| File | Description |
|---|---|
internal/net/healthcheck/types.go |
Updates defaults and validates settings. |
internal/net/healthcheck/session.go |
Reconfigures live timers and sessions. |
internal/net/healthcheck/reconfiguration_test.go |
Tests live reconfiguration. |
internal/net/healthcheck/probe_phase.go |
Computes deterministic probe phases. |
internal/net/healthcheck/probe_phase_test.go |
Tests phase distribution and timing. |
internal/net/healthcheck/manager.go |
Preserves sessions during updates. |
docs/net/configuration.md |
Documents health-check behavior. |
docs/net/architecture.md |
Updates architecture defaults. |
deploy/net/crd/net.unbounded-cloud.io_sitepeerings.yaml |
Updates generated interval descriptions. |
deploy/net/crd/net.unbounded-cloud.io_sitegatewaypoolassignments.yaml |
Updates generated interval descriptions. |
deploy/net/crd/net.unbounded-cloud.io_gatewaypools.yaml |
Updates generated interval descriptions. |
deploy/net/crd/net.unbounded-cloud.io_gatewaypoolpeerings.yaml |
Updates generated interval descriptions. |
deploy/machina/crd/unbounded-cloud.io_sites.yaml |
Updates generated interval descriptions. |
cmd/unbounded-net-node/wireguard_config.go |
Applies fresh profiles to WireGuard peers. |
cmd/unbounded-net-node/tunnel_config.go |
Applies profiles to shared tunnels. |
cmd/unbounded-net-node/site_watch_reconcile.go |
Resolves disabled and fresh profiles. |
cmd/unbounded-net-node/site_routing_reconcile_test.go |
Adapts reconciliation tests. |
cmd/unbounded-net-node/reconciliation_helpers.go |
Updates profile comparison and disabling. |
cmd/unbounded-net-node/reconciliation_helpers_test.go |
Updates profile expectations. |
cmd/unbounded-net-node/peer_healthcheck.go |
Resolves and registers profile settings. |
cmd/unbounded-net-node/peer_healthcheck_test.go |
Tests profile precedence and freshness. |
cmd/unbounded-net-node/main_update_test.go |
Adapts configuration test hooks. |
cmd/unbounded-net-node/gateway_pool_peering_protocol_test.go |
Adapts protocol tests. |
cmd/unbounded-net-node/cni_reconcile_test.go |
Adapts CNI reconciliation tests. |
cmd/kubectl-unbounded/app/net/create.go |
Documents inherited CLI defaults. |
cmd/kubectl-unbounded/app/net/create_test.go |
Tests CLI default preservation. |
api/net/v1alpha1/types.go |
Documents API interval defaults. |
Review details
Suppressed comments (1)
docs/net/configuration.md:383
- The newly documented precedence and disabled-fallback behavior conflicts with both custom-resource references:
docs/net/custom-resources.md:565-579anddocs/content/reference/networking/custom-resources.md:390-398still describe the old gateway fallback order and omit the explicit-disable rule. Update those pages with the same resolved-scope semantics.
For mesh peers, an explicit gateway-pool or pool-peering profile wins, followed by a `SiteGatewayPoolAssignment`, a `SitePeering`, and then the peer's `Site`.
For node-to-gateway peers, the node's site/pool assignment governs; gateway nodes use their explicit peer profile or the peer's pool profile, with a remote-site/pool assignment as fallback.
Shared-tunnel gateway peers may fall back to the local site's profile when no governing association exists; WireGuard gateway peers do not use that site fallback.
An explicitly disabled governing profile blocks every fallback.
- Files reviewed: 27/27 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Base automatically changed from
phealy/net-status-transport-efficiency
to
main
September 18, 2026 20:45
Spread initial and updated probe cadences by directed peer identity. Apply resolved profiles in place without losing health state, counters, or flap history; disabled associations block fallback. Default to 15s probes and document the nominal 45s failure-detection tradeoff while retaining explicit overrides. Preserve the newer routing rollback, localCIDRs, and gateway-pool peering protocol precedence. Adapt newer routing/protocol test callback signatures without changing their assertions. Regenerate the five consuming CRDs using controller-gen v0.21.0; only default documentation changes result. No simulator, e2e, or status transport/collection changes. Validated: scoped make fmt and make lint; go test for internal/net/healthcheck, cmd/unbounded-net-node, cmd/kubectl-unbounded/app/net, api/net/v1alpha1, api/machina/v1alpha3; go test -race for healthcheck, node, and net CLI; go build for affected production packages and kubectl-unbounded; repeat API generation is idempotent. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d2243398-6c36-4c3d-969e-7ed7bfb5b459
Rebound active timeout-transition grace when cadence settings change and align public reference defaults and precedence documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Patrick W. Healy (phealy)
force-pushed
the
phealy/net-healthcheck-efficiency
branch
from
September 18, 2026 20:45
d41d566 to
3e71c03
Compare
Document the inherited detect multiplier and explain how receive and transmit intervals determine the down timeout. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 07b1482a-4420-4169-8102-a2d2026849e4
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
Third production-only efficiency layer, based on #744.
Stack: #731 -> #743 (status collection) -> #744 (status transport/controller memory) -> #745 (this PR).
Intentional behavior change
Default transmit and receive intervals increase from 1s to 15s, reducing default probe traffic and processing. With the unchanged detect multiplier of 3, the nominal detection timeout increases from 3s to 45s; timer checks can add another half-timeout. Explicit interval overrides remain honored for deployments requiring faster detection.
Settings-only changes preserve live session state. Shortening a healthy session's timeout provides a bounded transition window for a reply under the new cadence. Changing the overlay IP still replaces the session.
Validation
This PR does not claim a measured whole-cluster CPU or RSS reduction. It reduces probe cadence and session churn while documenting the responsiveness tradeoff.