Skip to main content

health_checks

🗓️ 03092024 1153
📎 #resilience #microservices

General term that can encompass both liveness_checks and readiness_checks

Purpose

  • Determine whether a service or application is functioning as expected
  • Used to monitor various aspects of an application
    • Example
      • Ability to respond to requests
      • Connection to a database
      • Availability of necessary resources.
  • Monitor the overall health status of the application or service.

Summary of Differences

AspectHealth CheckLiveness CheckReadiness Check
PurposeMonitor overall health status.Check if the application is alive and should not be restarted.Check if the application is ready to accept traffic.
Action on FailureCould trigger alerts or corrective actions depending on configuration.Container is killed and restarted by orchestrator (e.g., Kubernetes).Traffic is not routed to the instance until it passes readiness checks.
Example ConditionService is up, connected to DB, and dependencies are healthy.Application is not deadlocked or crashed.Application has fully started and all dependencies are ready.
Typical Use CasesMonitoring dashboards, alerts, CI/CD pipelines.Detecting crashed containers, unresponsive services.Rolling updates, scaling operations, ensuring smooth deployments.

References

  • ChatGPT