简体   繁体   中英

Google App Engine Standard Java 8 - how to add health check for instances?

Is it possible to implement a custom health-check for instances in App Engine Standard? I tried to configure liveness-check and readiness-check, but these seem to be supported only in flex environment.

The reason I would like to do this is that recently we ran into following issue several times: because of a bug, one of the instances stopped responding successfully to requests, always returning HTTP status 500. This instance has been then kept alive and accessible for hours, leading to intermittent failures for our customers.

There is a very similar question (or even the same) in Google Groups, you can check it in this link .

I quote the response:

You cannot implement custom health checks in Google App Engine (GAE) Standard Environment. Our public documentation shows that adding legacy and updated health checks you are referring to is possible in Custom Runtime apps (ie GAE Flex apps) by configuring the app.yaml file [ 1]. This is an advantage of switching to GAE Flex.

For App Engine Standard, which doesn't afford you that flexibility, hardware and software failures that cause early termination or frequent restarts can occur without prior warning. This sometimes manifests as a non-responsive instance, returning HTTP status 500. We advised that you construct your GAE Standard apps to be able to handle this [2]. And you can reference this documentation for configuring your app.yaml file for your GAE app's app.yaml.

[ 1] https://cloud.google.com/appengine/docs/flexible/custom-runtimes/configuring-your-app-with-app-yaml

[2] https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_uptime

[3] https://cloud.google.com/appengine/docs/standard/python/config/appref

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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