If my health checks always return 200, but my backends return a bunch of 5xx's to GLB for actual load-balanced requests, will my backends be considered unhealthy to GLB? My experience seems to say "yes," but I can't find any documentation on this.
Asked
Active
Viewed 54 times
0
-
Details depend on the type of health check but 200 is expected. https://cloud.google.com/load-balancing/docs/health-checks – John Hanley Mar 22 '21 at 23:15
-
Right, my health checks are 200s but the actual load-balanced resources served by my back-ends give all kinds of response codes. Wondering if i need to avoid serving certain 5xx codes to keep backends healthy. – David Grant Mar 23 '21 at 01:15
-
Review what 5xx errors mean. To the load balancer, your backend service is failing. – John Hanley Mar 23 '21 at 01:38
-
Your health check doesn't test in a correct manner your app. Your health check shoud receive 5XX if your app serve 5XX – guillaume blaquiere Mar 23 '21 at 08:19
1 Answers
0
Went to GCP support. They told me that your backend can return 5xx's all day, and as long as the health check returns 200, the load balancer will consider your backend healthy.

David Grant
- 3,447
- 4
- 29
- 33