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:
- Go to https://app.hatchbox.io/apps
- Click the "View" button for your application
- Click the "Edit" button
- Scroll down to the "Health Check URI" text input
- Enter a relative path that returns a 200 status code, such as
/up
- Click the "Update Caddy" button
Note: By default, Caddy checks the health of your web servers every 30 seconds.