Skip to content

feat(agent): protocol-aware TCP-connect liveness for TCP-floor services - #312

Merged
bpalermo merged 1 commit into
mainfrom
feat/tcp-connect-liveness
Jun 25, 2026
Merged

bpalermo merged 1 commit into
mainfrom
feat/tcp-connect-liveness

Conversation

@bpalermo

Copy link
Copy Markdown
Owner

Replaces the #305 stopgap (force TCP endpoints HEALTHY) with real liveness. The whole health pipeline is protocol-agnostic above the probe — agent HTTP GET → health gateway → reflects the per-pod probe cluster's membership. Only the active checker changes: TCP services get a connect-only TcpHealthCheck to 127.0.0.1:<appPort> instead of an HTTP GET; liveness.go drops the #305 skip. A dead TCP app is now detected. 🤖 Generated with Claude Code

Replaces the #305 stopgap (force PROTOCOL_TCP endpoints HEALTHY, skip the probe)
with a real liveness signal. The HTTP delegated probe is inapplicable to a non-HTTP
app, but the rest of the pipeline is protocol-agnostic above the probe: the agent
does an HTTP GET to the health gateway whose health_check filter reflects the per-pod
probe cluster's membership. Only the active checker on that cluster is HTTP-specific.

- NewAppHealthProbeCluster gains a `tcp` flag: TCP services get a connect-only
  TcpHealthCheck (empty send/receive) against 127.0.0.1:<appPort> instead of the
  HTTP GET. A successful connect = healthy.
- listener.go passes the pod's protocol (endpoint.aether.io/protocol) through.
- liveness.go: drop the #305 TCP skip — the loop now probes TCP pods like everyone
  else and reads the connect-health the gateway reflects. EDS-mode flow is unchanged:
  TCP endpoints register UNHEALTHY, promote on first successful connect (warmup grace
  covers startup), demote when the app stops accepting connections.

A dead TCP app (process up but not listening) is now detected instead of assumed
healthy. The agent-side appHealth and the gateway are untouched (protocol-agnostic).

Validate on talos: TCP service app up -> endpoint HEALTHY + floor 200; stop the app's
listener -> endpoint UNHEALTHY (connect fails) -> traffic stops; restart -> recovers.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01N7oY7W8oDXrqDzFgoZh25S
@bpalermo
bpalermo merged commit 33bf905 into main Jun 25, 2026
9 checks passed
@bpalermo
bpalermo deleted the feat/tcp-connect-liveness branch June 25, 2026 00:20
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