Using custom api proxy health check in GALB for runtime region availability check - apigeex

Hi @dchiesa1 @kurtkanaskie @gonzalezruben

We are planning to migrate from GCLB (classic load balancer) to GALB (application load balancer) & was wondering if GALB has the capability to do the custom health using the health check proxy (need to define one newly) so that it could check the runtime availability of a particular apigeex region & report to GALB to route the traffic? Currently GCLB uses /healthz/ingress for the health check.

Yes, the GALB supports the same health checks as the classic GCLB.

You may want to consider using an environmental health check rather than a regional health check for more complete health checking. The regional health check (/healthz/ingress) only checks that there is an Apigee runtime. The environment health check (/healthz/some_base_path for a specific proxy basepath) or (/healthz/ - for catch all proxy with basepath ‘/’) will check that the proxy is deployed to an environment attached to a runtime and with a properly configured hostname in an attached Environment Group.

See https://cloud.google.com/apigee/docs/api-platform/debug/health-check?hl=en for more details.

For example, this creates an environment health check to a “catch-all” proxy with basepath “/”

gcloud compute health-checks create https hc-env-catchall \
  --project $PROJECT_ID \
  --request-path /healthz/ \
  --host=$HOST \
  --enable-logging \
  --port 443 \
  --global

You can then update the backend service:

gcloud compute backend-services update galb-backend-service \
  --global \
  --global-health-checks \
  --health-checks=hc-env-catchall

Is there a way to add the User-Agent:GoogleHC to the health check call?

When using gcloud compute health-checks create to create an HTTP-based health check, the resulting health checks will use the special header User-Agent: GoogleHC. This is a standard behavior for GCP’s health check probes.

1 Like