Skip to Content

Self-Hosted Deployment

Set up health checks

Point your load balancer and orchestrator probes at the right Databrain endpoints.

Endpoints

ServicePathUse it forAnswers
BackendGET /health/liveLiveness probe200 {"status":"live"}. Checks nothing else
BackendGET /health/readyReadiness probe200 when every check is up, 503 when one is down
HasuraGET /healthz?strict=trueHasura liveness200 when Hasura and its database are up
MCP serverGET /health on port 3144MCP liveness, if you turned it on200 {"status":"ok"}

None of these needs a sign-in.

What readiness checks

/health/ready runs these checks and waits for all of them:

CheckWhat it doesIncluded
hasuraCalls Hasura /healthzAlways. Fails if HASURA_ENDPOINT is not set
postgresRuns one small query on the metadata database through HasuraAlways
keycloakCalls Keycloak /health/liveOnly when KEYCLOAK_SERVER_URL is set
redisSends a PINGOnly when REDIS_HOST is set

Each HTTP check times out after 3 seconds. The Redis PING times out after 1.5 seconds.

A ready answer looks like this:

{
  "status": "ready",
  "checks": {
    "hasura": { "status": "UP" },
    "postgres": { "status": "UP" },
    "redis": { "status": "UP" }
  },
  "pools": {}
}

When one check is DOWN, status is not_ready, the answer is 503, and that check has an error. pools holds connection counts.

Readiness does not test your warehouse datasources, reports or other customer data.

Set up the probes

  • Liveness: GET /health/live on the backend port (3000 in the standard install). Restart the container when it fails.
  • Readiness: GET /health/ready. Take the container out of the load balancer when it fails. Do not restart for it. A 503 often means Hasura, the database or Redis is down, and a restart does not fix that.
  • Each readiness call runs real queries, so do not call it more often than you need.

Shutdown

On SIGTERM the backend stops taking new requests, finishes running work and flushes its buffers. After 30 seconds it stops anyway. Give the container a termination grace period of at least 30 seconds.

Other health routes

/health/dependencies and /health/cron show detail about every dependency and scheduled job. They need the x-databrain-event-secret header set to HASURA_EVENTS_SECRET. Do not expose them on the public internet, and do not use them as probes: /health/dependencies always answers 200.

Next, verify a new deployment.