Skip to content

Report API, runtime and game health as separate layers - #334

Merged
athNdev merged 1 commit into
mainfrom
feat/layered-health
Nov 4, 2026
Merged

athNdev merged 1 commit into
mainfrom
feat/layered-health

Conversation

@athNdev

@athNdev athNdev commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Part of OSS-241.

GET /health/detail answers with five layers, each carrying its own state and reason:

Layer Meaning Fails the endpoint
process the API is serving no
database the database ping succeeded yes, 503
runtime the daemon answered within 2s no
game stored server statuses and their age no
route the proxy runs when it is enabled no
  • A layer that could not be observed is unknown, never ok. A server status older than two minutes is stale; a game layer where every status is stale is unknown.
  • Only an unavailable database fails the probe. A remote Docker node that does not answer is reported as unavailable while the API stays ready, so a deployment does not restart a healthy process and take the remaining nodes down.
  • The snapshot carries aggregate counts only (playable, starting, stopped, stale, total) — no node names, hostnames or identifiers — so it stays safe as an unauthenticated probe.
  • /healthz and /readyz keep their existing semantics.

Covered by internal/health unit tests and handler tests for the status codes. knowledge-lint 10/10.

GET /health/detail answers with five layers: process, database, runtime,
game and route. A layer that could not be observed is unknown, never ok, and
a server status older than two minutes is stale rather than running.

Only an unavailable database fails the endpoint. A remote Docker node that
does not answer is reported as unavailable while the API stays ready, so a
deployment does not restart a healthy process and take the remaining nodes
down with it.

Refs OSS-241
@athNdev
athNdev merged commit 180c112 into main Nov 4, 2026
11 checks passed
@athNdev
athNdev deleted the feat/layered-health branch November 4, 2026 01:50
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