企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## 健康检查 健康检查[架构概述](../Introduction/Architectureoverview/Healthchecking.md)。如果为集群配置了健康检查,则会发出相应的统计信息。详见请参考[统计](../Configurationreference/Clustermanager/Statistics.md)相关文档。 - [HealthCheck](#healthcheck) - [HealthCheck.Payload](#healthcheckpayload) - [HealthCheck.HttpHealthCheck](#healthcheckhttphealthcheck) - [HealthCheck.TcpHealthCheck](#healthchecktcphealthcheck) - [HealthCheck.RedisHealthCheck](#healthcheckredishealthcheck) ### HealthCheck [HealthCheck proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/health_check.proto#L14) ``` { "timeout": "{...}", "interval": "{...}", "interval_jitter": "{...}", "unhealthy_threshold": "{...}", "healthy_threshold": "{...}", "reuse_connection": "{...}", "http_health_check": "{...}", "tcp_health_check": "{...}", "redis_health_check": "{...}" } ``` - **timeout**<br /> ([Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration)) 等待健康检查响应的时间。如果达到超时,则尝试健康检查将被视为失败。 - **interval**<br /> ([Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration)) 每次尝试健康检查之间的时间间隔。 - **interval_jitter**<br /> ([Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration)) 可选,抖动量(以毫秒为单位)。如果指定,在Envoy内部将抖动量叠加到时间间隔上。 - **unhealthy_threshold**<br /> ([UInt32Value](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#uint32value)) 在主机被标记为不健康之前,需要进行不健康的健康检查次数。请注意,对于http运行健康检查,如果主机以503响应,此阈值将被忽略,并且主机立即被视为不健康。 - **healthy_threshold**<br /> ([UInt32Value](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#uint32value)) 主机在标记为健康之前所需的健康检查次数。请注意,在启动过程中,只需要一次成功的健康检查即可将主机标记为健康状态。 - **reuse_connection**<br /> ([BoolValue](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#boolvalue)) 健康检查之间复用健康检查连接。默认是`true`。 - **http_health_check**<br /> ([HealthCheck.HttpHealthCheck](#healthcheckhttphealthcheck)) HTTP健康检查。 - **tcp_health_check**<br /> ([HealthCheck.TcpHealthCheck](#healthchecktcphealthcheck)) TCP健康检查 - **redis_health_check**<br /> ([HealthCheck.RedisHealthCheck](#healthcheckredishealthcheck)) Redis健康检查 **注意:只能在`http_health_check`,`tcp_health_check`,`redis_health_check`选其中一个进行设置。** ### HealthCheck.Payload [HealthCheck.Payload proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/health_check.proto#L43) 描述载荷中有效载荷的字节编码。 ``` { "text": "..." } ``` - **text**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar), REQUIRED) 十六进制编码载荷,例如,“000000FF”。准确地说,必须设置一个文本。 ### HealthCheck.HttpHealthCheck [HealthCheck.HttpHealthCheck proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/health_check.proto#L55) ``` { "path": "...", "service_name": "..." } ``` - **path**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar), REQUIRED) 指定运行健康检查期间,所请求的HTTP路径。例如`/healthcheck`。 - **service_name**<br /> ([string](https://developers.google.com/protocol-buffers/docs/proto#scalar)) 可选,服务名称参数,用于验证运行状况检查的群集的身份。请参阅[架构概述](../Introduction/Architectureoverview/Healthchecking.md)以获取更多信息。 ### HealthCheck.TcpHealthCheck [HealthCheck.TcpHealthCheck proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/health_check.proto#L77) ``` { "send": "{...}", "receive": [] } ``` - **send**<br /> ([HealthCheck.Payload](#healthcheckpayload)) 若有效载荷为空,意味着仅做连接的健康检查。 - **receive**<br /> ([HealthCheck.Payload](#healthcheckpayload)) 当检查响应时,执行模糊匹配,每个二进制块必须被找到,并且按照指定的顺序,但不一定是连续的。 ### HealthCheck.RedisHealthCheck [HealthCheck.RedisHealthCheck proto](https://github.com/envoyproxy/data-plane-api/blob/master/api/health_check.proto#L87) ``` {} ``` ## 返回 - [上一级](../v2APIreference.md) - [首页目录](../README.md)