adhocteam / nytimes-library

A collaborative documentation site, powered by Google Docs.
https://nyt-library-demo.herokuapp.com/
Apache License 2.0
1 stars 1 forks source link

Add a health endpoint for deployment monitoring #76

Closed ahinh43 closed 2 years ago

ahinh43 commented 2 years ago

With the eventual migration to GKE, we could help improve the monitoring of this app deployment if we added a basic /health endpoint so we can set up Liveness probe to monitor the health of the app. Should the liveness probe fail to get a good response from the health endpoint, it could automatically fail the pod and automatically restart it (and set our monitoring to fire off an alarm as a result)

Note that liveness probes will typically hit up the pod internally via the direct pod IP, so it would bypass the primary load balancer IAP, but it would likely not bypass the in app authentication unless the endpoint can be hit as an unauthenticated user (or we can set a cookie that can be placed on the liveness probe configuration to authenticate the request)

ahinh43 commented 2 years ago

turns out the /healthcheck endpoint exists. Thanks @zenkimoto for the tip!