We can enable health checks for gateway nodes at partition level or gateway cluster level.
When the health check is enabled, edge-admin will send a request to the edge-node to check if the edge-node is health. If it does not meet expectations, the node is considered unhealthy.
Note: the network from edge-admin to edge-node should be connectable before enabling health check, otherwise the node will be considered unhealthy by admin due to the bad network.
Let's try the partition level first. We can configure health checker of all gateway nodes in the same partition, which is the recommended way.
Let's go to the
Gateway Network Partitions page, which lists the partitions that already exist (usually, there is only one default partition, or a small number of them).
Next, we edit a partition and select the
Basic tab to see the health check switch (which is off by default).
After enabling the health check, we can further configure the health check parameters.
Edge supports three health check modes:
means that the edge admin will send such request to the edge node:
For tcp check mode, the node is considered healthy only if the tcp connection is successful. For http/https mode, you can also configure the desired response status code, or the string pattern that the response body needs to contain.
Clicking save will enable the health check.
When the number of consecutive unhealthy checks for a gateway node reaches the configured threshold, the
Edge will automatically mark the node as "offline" (the green light in front of the node IP will turn red on the
Gateway Cluster page).
This means: the node is automatically removed from the DNS and in-cluster caching services.
We can also view the specific logs of the health check:
Here we can see the number of recent successful/failed checks for each node and the reason for the failure.
If we want to do some special health check configuration for a particular gateway cluster, we can do that too.
Let's go to the
Gateway Clusters page, which lists the gateway clusters that already exist.
We click on the edit button for a gateway cluster and we can see that there are three options:
For example, let's turn off health checks for this gateway cluster.
Clicking save turns off the health check for this gateway cluster.