Skip to content
Last updated

Comprehensive readiness probe that checks the health of all application dependencies. This endpoint verifies database, cache, rate limiting, and vector store connectivity.

GEThttps://api.aitronos.com/v1/health/details

Description

Detailed health check that verifies all application dependencies are operational. Checks the health of database, Redis cache, limit enforcement system, and Qdrant vector store.

Useful for container orchestration readiness probes.

Response

Returns overall health status and individual component statuses.

Status Code: 200 OK

Response Body (Healthy):

{
  "status": "healthy",
  "components": [
    {
      "name": "database",
      "status": "healthy",
      "details": "Connection successful"
    },
    {
      "name": "redis",
      "status": "healthy",
      "details": "Connection successful"
    },
    {
      "name": "limit_enforcement",
      "status": "healthy",
      "details": "System operational"
    },
    {
      "name": "qdrant",
      "status": "healthy",
      "details": "Connection successful"
    }
  ]
}

Response Fields

FieldTypeDescription
statusstringOverall health status: "healthy", "degraded", or "unhealthy"
componentsarrayArray of component health statuses
components[].namestringComponent name
components[].statusstringComponent status: "healthy", "degraded", or "unhealthy"
components[].detailsstringDetailed status information (optional)

Status Logic

The overall status is determined by component statuses:

  • healthy - All components are healthy
  • degraded - At least one component is degraded, but none are unhealthy
  • unhealthy - At least one component is unhealthy

Health Components

Database

  • Name: "database"
  • Checks: PostgreSQL connection and query execution
  • Healthy: Connection successful
  • Unhealthy: Connection timeout or error

Redis

  • Name: "redis"
  • Checks: Redis cache connectivity
  • Healthy: Connection successful
  • Unhealthy: Connection timeout or error

Limit Enforcement

  • Name: "limit_enforcement"
  • Checks: Rate limiting system status
  • Healthy: System operational
  • Unhealthy: System unavailable

Qdrant

  • Name: "qdrant"
  • Checks: Vector store connectivity
  • Healthy: Connection successful
  • Unhealthy: Connection timeout or error

Usage

This endpoint is ideal for:

  • Container readiness probes
  • Dependency connectivity monitoring
  • Comprehensive health monitoring
  • Pre-deployment validation

Kubernetes Configuration

readinessProbe:
  httpGet:
    path: /v1/health/details
    port: 8000
  initialDelaySeconds: 5
  periodSeconds: 5

Response Time

Expected response time: < 500ms (includes all dependency checks)

Monitoring Integration

The readiness endpoint can be integrated with:

  • Prometheus - Health metrics collection
  • Grafana - Dashboard visualization
  • ELK Stack - Log aggregation
  • Custom monitoring - Automated alerts

Error Scenarios

Degraded State

When one or more components are degraded but none are unhealthy:

{
  "status": "degraded",
  "components": [
    {
      "name": "database",
      "status": "healthy",
      "details": "Connection successful"
    },
    {
      "name": "redis",
      "status": "degraded",
      "details": "High latency detected"
    },
    {
      "name": "limit_enforcement",
      "status": "healthy",
      "details": "System operational"
    },
    {
      "name": "qdrant",
      "status": "healthy",
      "details": "Connection successful"
    }
  ]
}

Unhealthy State

When one or more components are unhealthy:

{
  "status": "unhealthy",
  "components": [
    {
      "name": "database",
      "status": "unhealthy",
      "details": "Connection timeout"
    },
    {
      "name": "redis",
      "status": "healthy",
      "details": "Connection successful"
    },
    {
      "name": "limit_enforcement",
      "status": "healthy",
      "details": "System operational"
    },
    {
      "name": "qdrant",
      "status": "unhealthy",
      "details": "Connection refused"
    }
  ]
}