Skip to main content

Health Check Endpoints

Monitor the API’s health, readiness, and liveness for deployment orchestration and monitoring.

Endpoints Overview

GET /health

Legacy health endpoint that returns basic API status.

Request

Response (200 OK)

GET /ready

Kubernetes readiness probe that performs comprehensive service checks.

What It Checks

  • Redis connection and availability
  • Database connection (when enabled)
  • DNS resolution capability
  • SMTP connectivity
  • API service health

Request

Response (200 OK)

When all services are ready:

Response (503 Service Unavailable)

When one or more services are unhealthy:

Kubernetes Configuration

GET /live

Kubernetes liveness probe for basic alive status.

What It Checks

  • API service is running
  • HTTP server is responsive
  • No deadlocks or hangs
Note: This is a lightweight check that doesn’t verify dependencies

Request

Response (200 OK)

Kubernetes Configuration

Best Practices

Monitoring Setup

Create health check monitors in your monitoring system:

Load Balancer Configuration

Use /ready for load balancer health checks:

Deployment Strategy

Use readiness checks for zero-downtime deployments:

Troubleshooting

Redis Connection Failed

If /ready returns Redis error: Cause: Redis is unreachable or down Solution:
  1. Check Redis service status
  2. Verify network connectivity
  3. Check Redis credentials
  4. Review firewall rules
Impact: API will work but with degraded performance (no DNS caching)

DNS Resolution Failed

If /ready returns DNS error: Cause: DNS server unreachable or misconfigured Solution:
  1. Check DNS server configuration
  2. Verify network DNS settings
  3. Test DNS resolution manually: dig @8.8.8.8 google.com
Impact: Email validation will fail at DNS layer

SMTP Connection Failed

If /ready returns SMTP error: Cause: SMTP port blocked or firewall restriction Solution:
  1. Check outbound port 25 is open
  2. Verify firewall rules allow SMTP
  3. Test SMTP connectivity: telnet smtp.gmail.com 25
Impact: Email validation will fail at SMTP layer

Next Steps

API Overview

Explore all API endpoints

Error Handling Guide

Learn how to handle errors