Health checks
Overview
PowerSync Service provides health check endpoints and configuration options to help you monitor the health and readiness of your deployment. These checks allow you to catch issues before they impact your users.
Health Check Endpoints
The following HTTP endpoints are available:
-
Startup Probe:
GET /probes/startup
200
– Service has started up correctly400
– Service has not yet started
-
Liveness Probe:
GET /probes/liveness
200
– Service is alive400
– Service is not alive
Example: Docker Health Checks
A configuration with Docker Compose might look like:
You can find a complete example in the self-host-demo app.
Advanced: Configurable Health Check Probes (v1.12.0+)
Starting with version 1.12.0, PowerSync Service supports configurable health check probes.
You can now choose between filesystem-based and HTTP-based probes, or use both, via the config file. This is especially useful for environments with restricted I/O.
Configuration options:
If no healthcheck
configuration is provided, the service defaults to the previous behavior for backwards compatibility.