Skip to content

Health Checks ​

@connectum/healthcheck implements the gRPC Health Checking Protocol and can expose HTTP endpoints for platform probes. The application owns status transitions; the protocol only reports them.

One health registry, multiple protocol views Application lifecycle and dependency checks update a shared health registry, whose gRPC and HTTP views supply platform probes without separate status state for HTTP aliases. Applicationlifecycle + dependenciesready / stopping / checksSet service / component state One health registryServices + application componentsAll must be SERVING; empty is unhealthyRead aggregate or select one named entry gRPC health viewsCheck / Watch / ListRouter request gate appliesgRPC probes need HTTP/2 HTTP views (opt-in)Aliases: /healthz /health /readyzSERVING 200; unhealthy 503?service selects one entry Platform probes and terminationHTTP/1.1 or plaintext gRPC/HTTP/2, matching the serverReadiness controls traffic; liveness can restart the containerGrace period covers preStop, request drain and shutdown hooks
The application owns transitions. /healthz, /health and /readyz report the same aggregate state. Different liveness and readiness semantics require application-owned checks; changing the path name does not create another state.

With the healthcheck imports and your routes in scope:

typescript
const server = createServer({
  services: [routes],
  protocols: [Healthcheck({ httpEnabled: true })],
});

server.on('ready', () => {
  healthcheckManager.update(ServingStatus.SERVING);
});

Choose the owning guide ​

Start with the health protocol or Kubernetes probes.

Exact health tasks and API
NeedCanonical destination
Configure protocol options, HTTP paths, status semantics, components, or dependency stateHealth protocol
Configure Kubernetes HTTP/gRPC probes and termination timingKubernetes integration
Coordinate drain hooks and the global shutdown deadlineGraceful shutdown
Find an exact manager or protocol symbol@connectum/healthcheck API

Readiness means the process can accept useful work; liveness means it should not be restarted. During shutdown, mark the service not serving before draining traffic. Worker-only processes with services: [] should register an application component in the manager so /healthz has an explicit readiness source; the protocol guide owns that pattern.

Use the health protocol guide for installation and configuration.