Skip to main content
GET

Overview

The health check endpoint is used to monitor the operational status of WuKongIM server and cluster, ensuring the system is running normally.

Response Fields

string
required
Health status: ok indicates normal, error indicates abnormal
string
Error message (only appears when status is error)

Status Codes

Use Cases

Load Balancer Health Checks

Nginx Configuration:
HAProxy Configuration:

Container Orchestration

Docker Compose:
Kubernetes Deployment:

Monitoring and Alerting

Prometheus Monitoring:
Custom Health Check Script:

Application Integration

Service Discovery:

Best Practices

  1. Monitoring Frequency: Recommended to check health status every 30-60 seconds
  2. Timeout Settings: Set reasonable timeout values to avoid false alarms
  3. Load Balancing: Can be used for load balancer health checks
  4. Container Orchestration: Suitable for Docker and Kubernetes health check configurations
  5. Alerting Mechanism: Integrate with monitoring systems for automated alerting
  6. Graceful Degradation: Implement fallback mechanisms when health checks fail
  7. Circuit Breaker: Use circuit breaker pattern to handle unhealthy services
  8. Logging: Log health check results for troubleshooting and analysis