Overview
The Health Check API provides endpoints to monitor the health and readiness of your Conductor instance, check service dependencies, and retrieve system metrics.
GET /health
Check basic system health.
Include detailed health information
Health check timeout in milliseconds
Response
Health status: healthy, degraded, unhealthy
Unix timestamp of health check
System uptime in milliseconds
Service-specific health status (when details=true) Database health: up, down, degraded
services.database.latency
Database response time in ms
AI services health: up, down, degraded
Available AI provider statuses
Storage health: up, down, degraded
Available storage types (KV, R2, D1)
cURL
cURL (Detailed)
TypeScript
Python
curl https://your-worker.workers.dev/health
Basic Response
Detailed Response
Degraded Response
{
"status" : "healthy" ,
"timestamp" : 1704067200000 ,
"uptime" : 3600000 ,
"version" : "1.0.0"
}
GET /health/live
Liveness probe - check if service is running.
Response
Always true if service responds
curl https://your-worker.workers.dev/health/live
{
"alive" : true ,
"timestamp" : 1704067200000
}
GET /health/ready
Readiness probe - check if service can handle requests.
Response : 200 OK or 503 Service Unavailable
true if ready to handle requests
Detailed readiness checks Storage services availability
curl https://your-worker.workers.dev/health/ready
Ready (200 OK)
Not Ready (503)
{
"ready" : true ,
"timestamp" : 1704067200000 ,
"checks" : {
"database" : true ,
"ai" : true ,
"storage" : true
}
}
GET /health/metrics
Get system performance metrics.
Time period: 1m, 5m, 15m, 1h, 24h
Response
Time period covered by metrics
Execution metrics Total executions in period
Average execution duration (ms)
Member usage statistics Executions by member type
Error statistics Errors grouped by error code
cURL
cURL (Last 24 hours)
TypeScript
curl https://your-worker.workers.dev/health/metrics
{
"period" : "1h" ,
"timestamp" : 1704067200000 ,
"executions" : {
"total" : 1250 ,
"successful" : 1180 ,
"failed" : 70 ,
"avgDuration" : 234
},
"members" : {
"total" : 5420 ,
"byType" : {
"Think" : 2100 ,
"Function" : 1800 ,
"Data" : 980 ,
"API" : 540
}
},
"errors" : {
"total" : 70 ,
"byCode" : {
"TIMEOUT" : 25 ,
"VALIDATION_ERROR" : 30 ,
"NETWORK_ERROR" : 15
}
},
"resources" : {
"cpu" : 125000 ,
"memory" : 52428800
}
}
Kubernetes Probes
Use health endpoints in Kubernetes deployments:
apiVersion : apps/v1
kind : Deployment
metadata :
name : conductor
spec :
template :
spec :
containers :
- name : conductor
image : conductor:latest
livenessProbe :
httpGet :
path : /health/live
port : 8080
initialDelaySeconds : 10
periodSeconds : 30
readinessProbe :
httpGet :
path : /health/ready
port : 8080
initialDelaySeconds : 5
periodSeconds : 10
Health Check Best Practices
Use liveness probes - Detect when service needs restart
Use readiness probes - Prevent traffic to unready instances
Monitor metrics - Track performance over time
Set appropriate timeouts - Balance responsiveness vs accuracy
Check dependencies - Verify database, AI, storage health
Use detailed checks in staging - Get full diagnostics
Use basic checks in production - Minimize overhead
Alert on degraded status - Catch issues early
Log health events - Debug health issues
Test health endpoints - Ensure probes work correctly
Error Responses
Service Unavailable
{
"status" : "unhealthy" ,
"timestamp" : 1704067200000 ,
"error" : "Database connection failed" ,
"services" : {
"database" : {
"status" : "down" ,
"error" : "Connection timeout"
}
}
}
Timeout
{
"error" : "Health check timeout" ,
"timeout" : 5000 ,
"timestamp" : 1704067200000
}