Skip to content

Instantly share code, notes, and snippets.

@schappim
Last active September 10, 2024 23:32
Show Gist options
  • Save schappim/8353c0598562d430c9547d447f3d16a2 to your computer and use it in GitHub Desktop.
Save schappim/8353c0598562d430c9547d447f3d16a2 to your computer and use it in GitHub Desktop.

How to Enable Load Balancer Health Checks in Hatchbox

A load balancer health check with Caddy ensures that backend servers are functioning properly by periodically sending requests and removing unresponsive servers from the pool.

To enable health checks, your application must have a relative path that returns a 200 status code.

Steps to enable health checks:

  1. Go to https://app.hatchbox.io/apps
  2. Click the "View" button for your application
  3. Click the "Edit" button
  4. Scroll down to the "Health Check URI" text input
  5. Enter a relative path that returns a 200 status code, such as /up
  6. Click the "Update Caddy" button

Note: By default, Caddy checks the health of your web servers every 30 seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment