Skip to main content
Starter Kit - Ships with your template. You own it - modify freely.

Overview

The health check ensemble provides a simple /health endpoint that returns the status of your Conductor application. This endpoint is designed for:
  • Load balancers: Health checks for traffic routing decisions
  • Monitoring systems: Uptime monitoring and alerting
  • Container orchestration: Kubernetes liveness/readiness probes
  • Status pages: Real-time service availability
The endpoint is intentionally lightweight and always returns fresh status without caching.

Endpoint Details

Why No Cache?

Health checks should always reflect the current state of your application. Caching health check responses can mask issues and prevent load balancers from detecting failures quickly.

Response Format

Success Response

HTTP Status Codes

  • 200 OK: Application is healthy
  • 503 Service Unavailable: Application is unhealthy (modify script to return this)

Full Ensemble Definition

Customization

Adding Database Health Checks

Extend the health check to verify database connectivity:

Adding External Service Checks

Verify connectivity to external APIs or services:

Custom Health Check Logic

Create a custom handler with your own health checks: scripts/system/custom-health-check.ts
Then reference it in your ensemble:

Load Balancer Integration

Cloudflare Load Balancer

Configure your Cloudflare Load Balancer to use the health check:
  1. Navigate to Traffic > Load Balancing in Cloudflare dashboard
  2. Edit your origin pool
  3. Configure health check:
    • Path: /health
    • Type: HTTPS
    • Method: GET
    • Interval: 60 seconds
    • Timeout: 5 seconds
    • Retries: 2
    • Expected codes: 200

Kubernetes Probes

Use the health check for liveness and readiness probes:

AWS Application Load Balancer

Configure ALB health checks:
  1. Navigate to Target Groups in AWS console
  2. Edit health check settings:
    • Protocol: HTTPS
    • Path: /health
    • Port: 443
    • Healthy threshold: 2
    • Unhealthy threshold: 3
    • Timeout: 5 seconds
    • Interval: 30 seconds
    • Success codes: 200

GCP Load Balancer

Configure health check for GCP backend services:

Best Practices

Keep It Fast

Health checks should complete quickly (under 500ms). Avoid:
  • Complex database queries
  • External API calls with long timeouts
  • Heavy computations
  • Multiple sequential checks
Instead:
  • Use simple SELECT 1 queries for database checks
  • Set short timeouts (2-5 seconds) for external calls
  • Run checks in parallel when possible
  • Cache expensive checks with short TTLs

Differentiate Liveness vs Readiness

Consider creating two endpoints: /health/live - Is the application running?
  • Basic health check
  • Fast response
  • Rarely fails
/health/ready - Is the application ready to serve traffic?
  • Includes database checks
  • Verifies dependencies
  • May fail during startup

Security Considerations

While health checks are typically public, you may want to:
  1. Rate limit: Prevent health check abuse
  2. Add authentication: For sensitive information
  3. Limit response details: In production, avoid exposing internal details

Testing

Test your health check locally:

Monitoring

Uptime Monitoring

Integrate with monitoring services:
  • Pingdom: Create HTTP check for /health
  • UptimeRobot: Monitor every 5 minutes
  • Better Uptime: Set up status page
  • Datadog: Create synthetic test
  • New Relic: Configure availability monitoring

Alerting

Set up alerts for:
  • Health check returning unhealthy status
  • Response time exceeding threshold (e.g., > 1s)
  • Multiple consecutive failures
  • Specific component failures (database, cache, API)

System Ensembles

Explore other system ensembles

Triggers

Learn about HTTP triggers

Operations

Understand code operations

Testing & Observability

Set up monitoring and alerts