Overview
Pangolin provides automated health checking for targets to ensure traffic is only routed to healthy services. Health checks are essential for building highly available services, as they automatically remove unhealthy targets from traffic routing and load balancing.How Health Checks Work
Monitoring Process
Health checks operate continuously in the background:- Periodic Checks: Pangolin sends requests to your target endpoints at configured intervals
- Status Evaluation: Responses are evaluated against your configured criteria
- Traffic Management: Healthy targets receive traffic, unhealthy targets are excluded
- Automatic Recovery: Targets are automatically re-enabled when they become healthy again
Health Check vs Target Endpoint
Flexible Monitoring
The health check endpoint can be the same as your target, but you can also monitor a different endpoint. This allows you to create dedicated health check endpoints that provide more detailed service status information.
Target Health States
Targets can exist in three distinct states that determine how traffic is routed:Unknown
Initial State: Targets start in this state before first health checkTraffic Behavior: Unknown targets still route traffic normallyDuration: Until first health check completes
Unhealthy
Failed Checks: Target has failed health check criteriaTraffic Behavior: No traffic is routed to unhealthy targetsLoad Balancing: Excluded from load balancing rotation
Healthy
Passing Checks: Target is responding correctly to health checksTraffic Behavior: Receives traffic according to load balancing rulesLoad Balancing: Included in load balancing rotation
Configuring Health Checks
1
Access Target Settings
In the Pangolin dashboard, navigate to your resource and locate the target in the table.
2
Open Health Check Configuration
Click the settings wheel (⚙️) next to the health check endpoint column.
3
Configure Health Check Parameters
Fill out the health check configuration with your desired parameters.
4
Save Configuration
Save your settings to enable health checking for the target.
Health Check Parameters
Endpoint Configuration
Health Check Target
Target Endpoint: The URL or address to monitor for health statusDefault Behavior: Usually the same as your target endpointCustom Endpoints: Can monitor different endpoints (e.g.,
/health
, /status
)Timing Configuration
Healthy Interval
Purpose: How often to check targets that are currently healthyTypical Range: 30-60 secondsConsideration: Less frequent checks reduce overhead
Unhealthy Interval
Purpose: How often to check targets that are currently unhealthyTypical Range: 10-30 secondsConsideration: More frequent checks enable faster recovery
Response Configuration
Timeout Settings
Request Timeout: Maximum time to wait for a health check responseDefault Behavior: Requests exceeding timeout are considered failedRecommended: Set based on your service’s typical response time
HTTP Response Codes
Healthy Codes: Which HTTP status codes indicate a healthy targetCommon Settings: 200, 201, 202, 204Custom Codes: Configure based on your service’s health endpoint behavior
Failover Behavior
Automatic Traffic Exclusion
When a target becomes unhealthy:1
Health Check Failure
Target fails to meet health check criteria (response code, timeout, etc.)
2
Status Update
Target status changes from “Healthy” to “Unhealthy”
3
Traffic Removal
Target is immediately removed from traffic routing configuration
4
Load Balancer Update
Load balancing configuration is updated to exclude the unhealthy target
5
Continued Monitoring
Health checks continue at the unhealthy interval for recovery detection
Automatic Recovery
When an unhealthy target recovers:1
Successful Health Check
Target begins responding correctly to health checks
2
Status Update
Target status changes from “Unhealthy” to “Healthy”
3
Traffic Restoration
Target is automatically added back to traffic routing
4
Load Balancer Update
Load balancing resumes including the recovered target
High Availability Strategies
Multi-Target Redundancy
Service Redundancy
Deploy multiple instances of your service across different targets to ensure availability even when some targets fail.
Cross-Site Failover
Geographic Distribution
Distribute targets across multiple sites to protect against site-level failures.