about health check #12552
Replies: 1 comment
-
You can enable automatic (proactive) health checks in APISIX by configuring active health checks in your upstream configuration. By default, APISIX uses passive health checks, which only update node health after a request. However, with active health checks, APISIX will periodically probe upstream nodes on a schedule, independent of traffic, which is ideal for real-time dashboards and monitoring abnormal nodes. To set this up, add a "checks": {
"active": {
"type": "http",
"http_path": "/",
"healthy": {
"interval": 2,
"successes": 1
},
"unhealthy": {
"interval": 1,
"timeouts": 3
}
}
} For gRPC upstreams, use: healthCheck:
active:
type: grpc
healthy:
successes: 2
unhealthy:
http_failures: 2
timeout: 5
interval: 30 Once configured, APISIX will automatically and continuously check the health of all nodes in the server group, and you can visualize this data using monitoring tools like Prometheus. No code modification is needed—just configuration. It's also recommended to combine both active and passive health checks for robust monitoring in production environments. More details and examples are available in the official documentation and community threads. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
By default, the health check of apisix will be triggered only after a request is made. However, the health check indicator is a very important indicator of the gateway. For example, it is necessary to make some big charts based on the health status of all server groups to see which nodes are abnormal, rather than only knowing after a request. So I would like to ask if anyone has some mature modification experience in this area, such as automatically turning on health check after configuring the server group.
Beta Was this translation helpful? Give feedback.
All reactions