Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. As a part of doing this we've setup a health check that is configured like this:

enter image description here

But the strange thing is that when I tail the logs of the Wordpress instance it looks like this:

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"

I.e. it looks like the health check is sent every other second (or even more?). Why could this be?

like image 688
Johan Avatar asked Mar 14 '23 13:03

Johan


2 Answers

There are several health checkers that health check your VM to provide redundancy in case of one health checker misbehaves or down. Each of them abide by configured health checking frequency.

like image 85
amb Avatar answered Apr 05 '23 22:04

amb


Google uses multiple systems to health check the probe, that is why you see multiple requests. Source here: 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

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.

like image 29
Cassio Avatar answered Apr 05 '23 23:04

Cassio