GioJSdocs
On this page

[health]

The /_gio/health endpoint load balancers and gio start poll: on by default, with a switch for the details it reports.

gio.toml
[health]
details = false     # only {"status":"ok","nodeReady":...}

Reference

KeyDefaultDescription
enabledbooleantrueServe the endpoint. Turn it off when your platform probes another URL and you want no extra public endpoint.0 / false / empty: /_gio/health answers 404
detailsbooleantrueReport the deployment id, worker topology, cache size and uptime. Off, the answer keeps what a probe needs, so the deployment id and worker count are not public.0 / false / empty: Only status and nodeReady

Behavior

The endpoint answers 200 from Rust while the process runs, without waiting for the worker:

json
{
  "cacheEntries": 0,
  "deploymentId": "495ddeb861e730d0",
  "http2": true,
  "nodeReady": true,
  "status": "ok",
  "tls": false,
  "uptimeSecs": 0,
  "workers": { "configured": 1, "ready": 1 }
}
  • nodeReady is false while no render worker is ready - during the respawn of the only worker, or of every worker in a pool. Cached and static content still serves, so the status stays 200: readiness probes should read the field.
  • With details = false the body is {"nodeReady":true,"status":"ok"}.
  • The endpoint is never rate-limited and no gio.toml or middleware.ts rule applies to it.

No key in this section logs a warning.

Examples

A Kubernetes readiness probe

The status is always 200, so use the HTTP check for liveness and read nodeReady for readiness (the app image has Node, so no extra tool is needed):

deployment.yaml
livenessProbe:
  httpGet: { path: /_gio/health, port: 3000 }
readinessProbe:
  exec:
    command:
      - node
      - -e
      - "fetch('http://127.0.0.1:3000/_gio/health').then(r => r.json()).then(h => process.exit(h.nodeReady ? 0 : 1), () => process.exit(1))"

Hide the deployment id

gio.toml
[health]
details = false

Good to know

  • With enabled = false, gio dev, gio start and the testing kit cannot read readiness from it, and treat any answer from the server as ready.
  • The deployment id is also visible in every page (window.__GIO_DEPLOYMENT_ID__): details = false keeps it off this endpoint only.

Version history

VersionChanges
v0.1.0-beta.8Introduced the section with enabled and details. The endpoint reports workers: { configured, ready }.
v0.1.0-beta.6The endpoint reports deploymentId, nodeReady, cacheEntries and uptimeSecs.
v0.1.0-beta.1/_gio/health introduced, not configurable.