askill
health-checks

health-checksSafety --Repository

Implement liveness, readiness, and dependency health checks

0 stars
1.2k downloads
Updated 12/26/2025

Package Files

Loading files...
SKILL.md

Health Checks

Different checks serve different purposes. Don't conflate them.

Check Types

EndpointPurposeOn FailureShould Check
/health/liveProcess alive?K8s restarts podOnly process responsiveness
/health/readyCan handle traffic?K8s removes from LBDB, cache, critical deps
/health/startupInit complete?K8s waitsInitialization status

Liveness (Simple)

Return 200 OK immediately. Never check dependencies.

Checking DB in liveness = pod restarts when DB is down = cascading failure.

Readiness (Dependency Checks)

For each dependency:
  → Check with timeout (1-2s)
  → Record healthy/unhealthy status
Return 503 if any critical dependency unhealthy

Response Format

{
  "status": "healthy|unhealthy",
  "version": "1.2.3",
  "dependencies": {
    "database": "healthy",
    "cache": "unhealthy: connection refused"
  }
}

Kubernetes Config

livenessProbe:
  httpGet: { path: /health/live, port: 8080 }
  periodSeconds: 10
  failureThreshold: 3

readinessProbe:
  httpGet: { path: /health/ready, port: 8080 }
  periodSeconds: 5
  failureThreshold: 3

startupProbe:
  httpGet: { path: /health/startup, port: 8080 }
  periodSeconds: 5
  failureThreshold: 30  # 150s max startup

Anti-Patterns

  • Liveness checks dependencies → Cascading restarts
  • No timeout on checks → Health endpoint hangs
  • No caching → Thundering herd on health endpoints

References

  • references/platforms/{platform}/health-checks.md

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

AI review pending.

Metadata

Licenseunknown
Version-
Updated12/26/2025
Publishernexus-labs-automation

Tags

database