Health Monitoring
Overview
Tasker provides enterprise-grade health monitoring endpoints designed for production deployments, Kubernetes environments, and load balancer health checks. The system offers three distinct endpoints optimized for different monitoring scenarios with optional authentication and authorization.
🎯 Health Endpoints
1. Readiness Probe - /tasker/health/ready
/tasker/health/readyPurpose: Kubernetes readiness probe and deep health validation Performance: < 100ms response time with comprehensive checks Authentication: Never required (K8s compatibility) Authorization: Never required (K8s compatibility)
GET /tasker/health/readyResponse Format:
{
"ready": true,
"checks": {
"database": { "status": "ok", "response_time_ms": 12 },
"migrations": { "status": "ok" },
"configuration": { "status": "ok" }
},
"timestamp": "2025-06-18T15:30:00Z"
}Use Cases:
Kubernetes readiness probes
Load balancer health checks
Deployment validation
Service mesh health validation
2. Liveness Probe - /tasker/health/live
/tasker/health/livePurpose: Kubernetes liveness probe and basic availability check Performance: < 10ms response time (minimal processing) Authentication: Never required (K8s compatibility) Authorization: Never required (K8s compatibility)
Response Format:
Use Cases:
Kubernetes liveness probes
Basic availability monitoring
Circuit breaker health checks
Minimal overhead health validation
3. Status Endpoint - /tasker/health/status
/tasker/health/statusPurpose: Comprehensive system status and metrics Performance: < 100ms response time with 15-second caching Authentication: Configurable (optional) Authorization: Uses tasker.health_status:index permission
Response Format:
Use Cases:
Monitoring dashboards
Alerting systems
Performance analysis
Capacity planning
🔒 Security Configuration
Authentication Configuration
Control authentication requirements for the status endpoint:
Important Notes:
Ready and live endpoints never require authentication (K8s compatibility)
Only the status endpoint can optionally require authentication
Authentication uses your configured authenticator class
Authorization Configuration
Enable fine-grained authorization for the status endpoint:
Permission Model: tasker.health_status:index
Resource:
tasker.health_status(specific to status endpoint)Action:
index(standard CRUD action for viewing)Full Permission:
tasker.health_status:index
Authorization Coordinator Implementation
🚀 Production Deployment
Kubernetes Configuration
Load Balancer Configuration
NGINX:
HAProxy:
Docker Health Checks
📊 Monitoring Integration
Prometheus Metrics
Create a custom exporter using the status endpoint:
Datadog Integration
Alerting Examples
PagerDuty Integration:
🔧 Configuration Options
Health Configuration
Performance Tuning
Database Connection Optimization:
Cache Configuration:
🧪 Testing Health Endpoints
RSpec Testing
Load Testing
🚨 Troubleshooting
Common Issues
1. Slow Health Check Responses
2. Cache Not Working
3. Authorization Errors
Health Check Debugging
📈 Performance Benchmarks
Typical Response Times
/ready
N/A
50-80ms
Medium
/live
N/A
5-10ms
None
/status
10-15ms
80-120ms
High
Optimization Tips
Use Redis / Memcached / Cloud provider - 5x faster than database cache
Optimize database queries - Use connection pooling
Monitor response times - Set up alerts for > 200ms responses
Use CDN for static health responses - For geographically distributed deployments
🔗 Related Documentation
Authentication & Authorization - Complete security system
SQL Functions - High-performance database functions
Configuration - System configuration options
Troubleshooting - Common issues and solutions
Tasker Health Monitoring provides enterprise-grade health endpoints optimized for production deployments, Kubernetes environments, and comprehensive system monitoring.
Last updated