Health Checks
Super goes beyond checking if a process ID (PID) exists. It actively probes the service to determine if it is truly operational.
Health checks are critical for:
- Dependency resolution: Unblocking dependent services once upstream is healthy.
- Operational visibility: Distinguishing “process running” from “service actually ready”.
- OTA Validation: Verifying a new version before committing an update.
Types of Checks
1. TCP Check
The simplest check. Succeeds if Super can establish a TCP connection to the port.
[programs.health_check]
type = "tcp"
port = 8080
# host = "127.0.0.1" # Optional, defaults to localhost2. HTTP Check
Performs an HTTP request. Succeeds if the response status code is 200-299.
[programs.health_check]
type = "http"
url = "http://127.0.0.1:8080/healthz"
method = "GET" # Optional3. Exec Check
Runs a shell command. Succeeds if the command exits with code 0. Ideal for checking file existence, database queries, or custom scripts.
[programs.health_check]
type = "exec"
command = "grep 'ready' /tmp/app.state"Behavior
- Interval: Checks are performed every 5 seconds (default).
- Startup: Super waits for the first successful check before marking a process as
Healthy. - Failure: If a check fails while running, status stays
Running(unhealthy) until the next check passes. Dependents that usedepends_onwait forHealthy.