Skip to content

GH-22: parallel health checks - #24

Merged
blainemotsinger merged 6 commits into
mainfrom
GH-22
Sep 20, 2026
Merged

blainemotsinger merged 6 commits into
mainfrom
GH-22

Conversation

@blainemotsinger

Copy link
Copy Markdown
Member

Summary

Health-check rounds now run in parallel across nodes, so a slow or hung node can no longer stall health-state convergence of the rest of the fleet. Cycle time becomes the slowest node instead of the sum of all nodes.

  • Parallel fan-out — checkAll spawns one goroutine per node and blocks on a sync.WaitGroup round barrier; rounds never overlap (effective interval = max(health_interval, round_duration)).
  • Per-node admission guard — skip-if-busy tryStart/finish serializes same-node checks, closing the known Recheck/cycle double-count race on ConsecutiveFailures.
  • Panic containment — a recovered runCheck wrapper (log + continue) means one node's panicking probe can neither crash the gateway nor wedge the guard/barrier.
  • Shutdown — Stop() continues to drain the in-flight round (bounded by the 5s client probe timeout).

No config changes, no public API changes; probes (vLLM /health + gpu-exporter /metrics) stay sequential within a node. Accepted residual: a Recheck finishing just before a tick can produce at most two sequential probes for one node per interval (each count is a real failed probe).

Testing

  • 5 new tests using real httptest backends: no-stall with a 2s slow node, admission guard blocks concurrent checks, Recheck no-op while in flight, Stop drains in-flight round, panic releases guard and round.
  • go test ./... -race -count=1 all green; timing-sensitive tests stable at -count=5; go vet clean.

Review

  • Implemented task-by-task with per-task spec + quality reviews (all clean), plus a final whole-branch review: 0 Critical / 0 Important.
  • Known follow-up candidates (not gating): one-line non-blocking stop-check on the ticker branch to avoid one extra round after Stop; a panic-count metric for the recovered-panic path.

@blainemotsinger blainemotsinger self-assigned this Sep 20, 2026
@blainemotsinger
blainemotsinger merged commit 6a80948 into main Sep 20, 2026
4 checks passed
@blainemotsinger
blainemotsinger deleted the GH-22 branch September 20, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant