a7-recipe-health-check
Overview
Health checks monitor backend nodes and remove unhealthy nodes from load
balancing. In current API7 EE usage, define the upstream and health check
configuration on a service, then attach routes to that service with
service_id.
API7 EE supports:
- Active checks: gateway probes each node.
- Passive checks: gateway observes real traffic responses.
Use both for production services that need automatic failure detection and recovery.
Health Check Configuration Reference
Active Health Check
| Field | Description |
|---|---|
upstream.checks.active.type | http, https, or tcp |
upstream.checks.active.http_path | HTTP path to probe |
upstream.checks.active.healthy.successes | Consecutive successes to mark healthy |
upstream.checks.active.unhealthy.http_failures | Consecutive HTTP failures to mark unhealthy |
upstream.checks.active.unhealthy.timeouts | Consecutive timeouts to mark unhealthy |