From 98187a39f87a1f1d692f0f4e4f806906a7a6f6d7 Mon Sep 17 00:00:00 2001 From: "R. Miles McCain" Date: Tue, 7 Jul 2020 01:27:08 +0000 Subject: [PATCH] Document health check endpoint (fixes #59) --- GUIDE.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/GUIDE.md b/GUIDE.md index abe60d9..cc2e621 100644 --- a/GUIDE.md +++ b/GUIDE.md @@ -10,6 +10,7 @@ * [Configuring a Reverse Proxy](#configuring-a-reverse-proxy) + [Cloudflare](#cloudflare) + [Nginx](#nginx) + * [Health Checks](#health-checks) + [Troubleshooting](#troubleshooting) --- @@ -175,6 +176,12 @@ Nginx is a self hosted, highly configurable webserver. Nginx can be configured t * [How to add SSL/HTTPS to Nginx (Ubuntu 16.04)](https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04) * [Nginx Documentation](https://nginx.org/en/docs/) +### Health Checks + +By default, Shynet includes a default health check endpoint at `/healthz/`. If the instance is running normally, this endpoint will return an HTTP status code of 200; if something is wrong, it will have a non-200 status code. To view the health data as JSON, send your request to `/healthz/?format=json`. + +This feature is helpful when running Shynet with Kubernetes, as it allows you to setup [startup readiness probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) that prevent traffic from being sent to your Shynet instances before they are ready. + --- ## Troubleshooting