Self-Hosted Deployment
Set up health checks
Point your load balancer and orchestrator probes at the right Databrain endpoints.
Endpoints
| Service | Path | Use it for | Answers |
|---|---|---|---|
| Backend | GET /health/live | Liveness probe | 200 {"status":"live"}. Checks nothing else |
| Backend | GET /health/ready | Readiness probe | 200 when every check is up, 503 when one is down |
| Hasura | GET /healthz?strict=true | Hasura liveness | 200 when Hasura and its database are up |
| MCP server | GET /health on port 3144 | MCP liveness, if you turned it on | 200 {"status":"ok"} |
None of these needs a sign-in.
What readiness checks
/health/ready runs these checks and waits for all of them:
| Check | What it does | Included |
|---|---|---|
hasura | Calls Hasura /healthz | Always. Fails if HASURA_ENDPOINT is not set |
postgres | Runs one small query on the metadata database through Hasura | Always |
keycloak | Calls Keycloak /health/live | Only when KEYCLOAK_SERVER_URL is set |
redis | Sends a PING | Only 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/liveon 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. A503often 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.