Health Check
By creating an resource we can instruct a data plane proxy to keep track of the health status for any other data plane proxy. When health-checks are properly configured, a data plane proxy will never send a request to another data plane proxy that is considered unhealthy. When an unhealthy proxy returns to a healthy state, Kuma will resume sending requests to it again.
This policy provides active checks. If you want to configure passive checks, please utilize the Circuit Breaker policy. Data plane proxies with active checks will explicitly send requests to other data plane proxies to determine if target proxies are healthy or not. This mode generates extra traffic to other proxies and services as described in the policy configuration.
As usual, we can apply sources
and destinations
selectors to determine how health-checks will be performed across our data plane proxies.
TCP
HTTP
We will apply the configuration with kubectl apply -f [..]
.
HTTP
We will apply the configuration with kumactl apply -f [..]
or via the .
HTTP health checks are executed using HTTP 2
- - HTTP path which will be requested during the health checks
requestHeadersToAdd
(optional) - list of headers which should be added to every health check request:append
(default, optional) - should the value of the provided header be appended to already existing headers (if present)- :
value
(optional) - the value of the header
send
- Base64 encoded content of the message which should be sent during the health checksreceive
list of Base64 encoded blocks of strings which should be found in the returning message which should be considered as healthy- when checking the response, “fuzzy” matching is performed such that each block must be found, and in the order specified, but not necessarily contiguous;
- if
receive
section won’t be provided or will be empty, checks will be performed as “connect only” and will be marked as successful when TCP connection will be successfully established.