简体   繁体   English

Google Cloud HTTP 负载均衡器运行状况检查发送的请求过多?

[英]Google Cloud HTTP Load Balancer health checks sends too many requests?

We've setup Wordpress in the Google Cloud (Kubernetes in Google Container Engnine if that matters) and configured an HTTP Load Balancer.我们已经在 Google Cloud 中设置了 Wordpress(如果重要的话,在 Google Container Engine 中设置了 Kubernetes)并配置了一个 HTTP 负载均衡器。 As a part of doing this we've setup a health check that is configured like this:作为这样做的一部分,我们设置了一个配置如下的健康检查:

在此处输入图片说明

But the strange thing is that when I tail the logs of the Wordpress instance it looks like this:但奇怪的是,当我拖尾 Wordpress 实例的日志时,它看起来像这样:

10.244.1.1 - - [21/Jan/2016:08:52:28 +0000] "GET /?healthCheck=true HTTP/1.1" 200 36784 "-" "GoogleHC/1.0"
10.244.1.1 - - [21/Jan/2016:08:52:30 +0000] "GET /?healthCheck=true HTTP/1.1" 200 36784 "-" "GoogleHC/1.0"
10.240.0.3 - - [21/Jan/2016:08:52:32 +0000] "GET /?healthCheck=true HTTP/1.1" 200 36784 "-" "GoogleHC/1.0"
10.244.1.1 - - [21/Jan/2016:08:52:33 +0000] "GET /?healthCheck=true HTTP/1.1" 200 36784 "-" "GoogleHC/1.0"
10.240.0.2 - - [21/Jan/2016:08:52:35 +0000] "GET /?healthCheck=true HTTP/1.1" 200 36784 "-" "GoogleHC/1.0"

Ie it looks like the health check is sent every other second (or even more?).即看起来健康检查每隔一秒(甚至更多?)发送一次。 Why could this be?为什么会这样?

There are several health checkers that health check your VM to provide redundancy in case of one health checker misbehaves or down.有几个健康检查程序可以对您的 VM 进行健康检查,以便在一个健康检查程序出现异常或停机时提供冗余。 Each of them abide by configured health checking frequency.他们每个人都遵守配置的健康检查频率。

Google uses multiple systems to health check the probe, that is why you see multiple requests. Google 使用多个系统对探测器进行健康检查,这就是您看到多个请求的原因。 Source here: https://cloud.google.com/load-balancing/docs/health-check-concepts#multiple-probers来源: https : //cloud.google.com/load-balancing/docs/health-check-concepts#multiple-probers

On the same document, they explain that each of these multiple systems will still obey the check interval you defined: https://cloud.google.com/load-balancing/docs/health-check-concepts#probes在同一份文档中,他们解释说,这些多个系统中的每一个仍将遵守您定义的检查间隔: https : //cloud.google.com/load-balancing/docs/health-check-concepts#probes

So, my understanding is that you can defined how often they check the health of you service, but you cannot define how many simultaneous systems are running to check the health.因此,我的理解是,您可以定义他们检查服务健康状况的频率,但您无法定义同时运行多少个系统来检查健康状况。

Please note this along with the Health check creation in GCP.请注意这一点以及 GCP 中的健康检查创建。

There are some mandate ingress rule to be added for the Health Check of Google LB's to work.为了让 Google LB 的健康检查工作,需要添加一些强制ingress规则。

https://cloud.google.com/load-balancing/docs/health-check-concepts#ip-ranges https://cloud.google.com/load-balancing/docs/health-check-concepts#ip-ranges

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM