Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

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.

Solved Solved
0 1 50
1 ACCEPTED SOLUTION

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

View solution in original post

1 REPLY 1