Health Checks
Configure and monitor application health checks
Overview
Every time an installation is redeployed (through a Git push, configuration change, etc.), a new set of replicas will replace the old ones. To ensure zero-downtime deployments, Ryvn follows this process:
New Deployment
Health Checks
Ryvn sends requests to your health check endpoint to verify the new replicas are ready.
Traffic Management
Completion
Health checks are essential for zero-downtime deployments. Every server should implement a health check endpoint so Ryvn can verify its readiness to handle traffic. Without health checks, there’s no reliable way to ensure new replicas are fully operational before routing requests to them.
Configuring Health Checks
To configure health checks for your installation:
Navigate to Environments
Select Environment
Select Installation
Configure Health Check
- In the Health Checks section, enter your health check endpoint path (e.g.,
/healthz
) - Click Save to apply the changes
The actions your endpoint should take to verify health depend on your installation’s details. We recommend performing operation-critical checks, such as executing a simple database query to confirm connectivity.
Health Check Protocol
With every health check, Ryvn sends an HTTP GET
request to each replica’s health check endpoint. The response
determines the replica’s health status:
Check | Response | Status |
---|---|---|
✅ Success | 2xx or 3xx status code within 5 seconds | Healthy |
❌ Failure | Any other status code or no response within 5 seconds | Potentially Unhealthy |
When a replica becomes potentially unhealthy, Ryvn takes different actions depending on the context:
Context | Time Period | Actions |
---|---|---|
Zero-Downtime Deployment | 15 consecutive minutes | • Deployment is canceled • Traffic continues flowing to existing replicas • You are notified of the cancellation |
Running Installation | 15 consecutive seconds | • Traffic stops routing to the unhealthy replica • Replica gets an opportunity to recover |
Running Installation | 60 consecutive seconds | • Replica is automatically restarted • You are notified of the restart |