A Go library for building health check endpoints with synchronous and asynchronous checks, caching, and middleware support.
Health is a Go library that provides a flexible health check endpoint for applications, allowing them to monitor the availability of dependencies like databases and external services. It aggregates health statuses into a JSON response to help ensure reliable operation in cloud environments by supporting both synchronous and asynchronous checks with caching.
Go developers building cloud-native applications that require robust health monitoring for dependencies such as databases, external APIs, or internal services, particularly those deploying on platforms like Kubernetes that use liveness and readiness probes.
Developers choose Health for its flexibility in mixing synchronous and asynchronous checks, enabling scalable monitoring without rewriting health logic, and its compatibility with existing health check implementations from other Go libraries, reducing integration effort.
A simple and flexible health check library for Go.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports both synchronous and asynchronous checks, allowing developers to mix on-demand and periodic monitoring for scalability, as detailed in the Synchronous vs. Asynchronous Checks section.
Configurable TTL caching reduces load on dependencies and prevents denial-of-service attacks, with options to disable it entirely using health.WithDisabledCache().
Designed to integrate with existing health check implementations from libraries like hellofresh/health-go, minimizing rewrite effort, as shown in the Compatibility With Other Libraries section.
Includes status listeners and middleware for authentication, logging, and request processing, enabling advanced monitoring without modifying core logic.
Lacks pre-configured checks for common dependencies, forcing reliance on third-party libraries or custom code, unlike some competitors that offer out-of-the-box solutions.
Setting up checks, timeouts, and middleware requires writing detailed Go code, which can be complex and error-prone compared to simpler, declarative alternatives.
With caching enabled, health status might not reflect real-time changes, potentially delaying detection of issues in fast-moving environments.