Healthz
Overview
GET /healthz returns the current bridge service health and runtime state.
It is not only a static liveness endpoint. It is intended as a runtime-oriented inspection endpoint.
Response Shape
A typical response includes:
okservicestatustimestampuptimeSecruntimeconfigbridgesessions
Runtime Section
runtime describes the current process and environment, for example:
nodeVersionplatformarchpidnodeEnv
Use cases:
- confirm runtime version
- distinguish deployment environments
- investigate environment mismatches
Config Section
config exposes the currently effective config summary, for example:
hostportlogLevelffmpegPathrtspUrlTemplatestreamRestartDelayMsstreamMaxRestartsstreamIdleTimeoutMsstreamSweepIntervalMs
Use cases:
- confirm
.envis applied - verify fallback/default behavior
- diagnose configuration issues
Bridge Section
bridge describes the current manager runtime state, for example:
activeSessionCountidleTimeoutMssweepIntervalMslastSweepAt
Use cases:
- check whether active sessions exist
- check whether the sweep loop is running
- verify idle detection is progressing
Sessions Section
sessions is the list of current managed session snapshots.
Each snapshot typically includes:
streamIdsessionIdstatepidclientCountrestartCountlastRestartAtlastStartedAtlastStoppedAtlastDataAtlastErrorAtlastExitCodelastExitSignal
How to Use It in Debugging
Recommended usage scenarios:
1. Startup verification
Confirm the service is up and config has been loaded.
2. After opening a live connection
Confirm:
activeSessionCountincreases- a new session appears
clientCountlooks correct
3. After disconnecting
Confirm:
- the session is cleaned up
activeSessionCountdrops- idle session removal has happened
4. Recovery validation
Inspect:
restartCountlastRestartAtlastDataAtlastExitCodelastExitSignal
Known Limits
The current /healthz endpoint is still a Phase 1 implementation. It prioritizes usefulness over completeness.
It does not yet include:
- Prometheus metrics
- deeper performance statistics
- historical session aggregation
- alerting integration
Its role is:
- current runtime inspection
- local debugging
- deployment verification support