Overview
Health check endpoints provide visibility into system status and service dependencies. These endpoints are used by load balancers, orchestrators (Kubernetes), and monitoring tools to determine service readiness and liveness.GET /health
Comprehensive health check covering all system dependencies.Request
Response
Overall system health status:
healthy, degraded, or unhealthyISO 8601 timestamp when the health check was performed
Application version from
APP_VERSION environment variableService uptime duration (e.g.,
2h15m30s)Health status of individual services
Detailed cache performance metrics (optional)
Cache hit/miss statistics by category (optional)
Response Codes
- 200 OK: Service is healthy or degraded (non-critical services unavailable)
- 503 Service Unavailable: Critical services (database) are unhealthy
The
/health endpoint returns 503 only when critical services like the database are down. Non-critical service failures (CCXT, Telegram) result in a degraded status with 200 OK, allowing the service to remain available for read-only operations.Example Response
GET /ready
Kubernetes-style readiness check for determining if the service can accept traffic.Request
Response
true if all critical services are ready, false otherwiseReadiness status of each service
Response Codes
- 200 OK: Service is ready to accept traffic
- 503 Service Unavailable: Critical dependencies are not ready
Example Response
GET /live
Lightweight liveness check to confirm the process is responsive.Request
Response
Always returns
alive if the service is runningISO 8601 timestamp when the liveness check was performed
Response Codes
- 200 OK: Process is alive and responsive
The
/live endpoint performs minimal work and does not check dependencies. Use this in Kubernetes liveness probes to detect completely deadlocked processes that need restart.Example Response
HEAD /health
Identical toGET /health but returns only headers (no response body). Useful for lightweight polling.
Health Check Strategy
Kubernetes Configuration
Recommended probe configuration for NeuraTrade deployment:Load Balancer Configuration
For cloud load balancers (AWS ALB, GCP LB), configure health checks:- Path:
/health - Interval: 30 seconds
- Timeout: 5 seconds
- Healthy Threshold: 2 consecutive successes
- Unhealthy Threshold: 3 consecutive failures
Monitoring Integration
Health endpoints emit Sentry telemetry spans for observability:health_check- Full health check with dependency status tagsreadiness_check- Readiness probe with service availability tagsliveness_check- Lightweight liveness verification
- HTTP method and URL tags
- Service status tags (
database.status,redis.status,ccxt.status) - Overall status tags (
overall.status,database.readiness) - Error capture for failed dependency checks