Health Checks ​
Expose liveness and readiness so orchestration platforms can manage your services safely.
Built-in Checks ​
Quarkus provides default endpoints that report service health and readiness.
Common endpoints:
/q/health(aggregate)/q/health/live(liveness)/q/health/ready(readiness)
Pipeline Startup Checks ​
The orchestrator performs startup health checks for dependent services before running a pipeline. These are controlled by pipeline.health.startup-timeout and will fail startup if required services are unhealthy.
Authenticated dependency probes ​
Registering a REST-client filter does not authenticate the separate HTTP health probe automatically. An application may select a Quarkus @Alternative HealthCheckService bean with @Priority and override protected HttpRequest customizeHttpHealthRequest(String clientType, String clientName, HttpRequest request) to authenticate the probe. The default returns the request unchanged. Preserve its URI, GET method, empty body, timeout and TLS verification. Reject unavailable credentials rather than retrying unsigned. Requests with Authorization, Cookie or X-API-Key headers require HTTPS, including a request returned by the customisation hook. The runtime rejects them before sending over HTTP. If customisation throws, the probe fails without an unsigned retry. The normal health-status check still requires HTTP 200; authentication must not turn HTTP 503 into a healthy result or substitute liveness for readiness.
Strict QUEUE_ASYNC services must also configure their intended idempotency policy explicitly, for example pipeline.orchestrator.idempotency-policy=CLIENT_KEY_REQUIRED. Authentication does not replace that startup requirement. Deploy compatible runtime and application versions together; the specialisation requires a runtime containing the customisation hook.
Custom Checks ​
Add checks for dependencies such as databases or external APIs.
@Readiness
@ApplicationScoped
public class PaymentProviderHealthCheck implements HealthCheck {
@Inject
PaymentProviderClient client;
@Override
public HealthCheckResponse call() {
try {
client.ping();
return HealthCheckResponse.up("payment-provider");
} catch (Exception error) {
return HealthCheckResponse.down("payment-provider");
}
}
}Graceful Shutdown and Readiness Drain ​
On Quarkus 4, TPF integrates with Quarkus's graceful shutdown lifecycle (ShutdownDelayInitiatedEvent and ShutdownListenerBuildItem) via PipelineShutdownCoordinator and PipelineShutdownListener:
Enable Quarkus's pre-shutdown delay at build time (so the pre-shutdown lifecycle hook is compiled into the artefact) and configure both the pre-shutdown delay window and drain timeout in rolling deployments so load balancers observe DOWN on /q/health/ready before in-flight work finishes and connections close:
# Build-time property: must be set when building the deployable artefact
quarkus.shutdown.delay-enabled=true
# Runtime properties: set delay long enough for readiness polling and routing propagation
quarkus.shutdown.delay=10S
quarkus.shutdown.timeout=30SIn Kubernetes deployments, also set spec.terminationGracePeriodSeconds above quarkus.shutdown.delay + quarkus.shutdown.timeout (plus any preStop hook and process teardown margin — for example 60 seconds for a 10-second delay and 30-second drain timeout) so the kubelet does not send SIGKILL before in-flight work finishes draining.
While draining, PipelineReadinessCheck reports DOWN with state=DRAINING and the current inFlight count, QueueAsyncSweepLoopHost, KafkaAwaitCompletionConsumer, and SQS pollers stop pulling new work, and PipelineExecutionService rejects new execution admissions while letting already-admitted in-flight executions complete.
Design Notes ​
- Keep checks fast.
- Fail readiness when critical dependencies are down.
- Use graceful degradation when possible.
- Keep startup checks aligned with pipeline dependencies.