Health Check
Check the health status of the FaynoSync service.
The Health Check API allows you to verify the operational status of the FaynoSync application. This is useful for monitoring and ensuring that your service is running as expected.
Endpoint
GET /health
Example Request
curl -X GET http://localhost:9000/health
Response
Success Response (200 OK)
{
"status": "healthy"
}
Response Fields
| Field | Type | Description |
|---|---|---|
status | string | Health status of the application (always "healthy" when functioning correctly) |
Error Response (424 Failed Dependency)
Returned when MongoDB or Redis does not answer a ping within 5 seconds. MongoDB is checked first.
{
"status": "unhealthy",
"details": "MongoDB connection failed"
}
{
"status": "unhealthy",
"details": "Redis connection failed"
}
| Field | Type | Description |
|---|---|---|
status | string | unhealthy |
details | string | Which dependency failed: MongoDB connection failed or Redis connection failed |
Usage
You can use this endpoint in your monitoring tools or health checks to ensure that the FaynoSync application is running smoothly. The endpoint pings MongoDB and Redis on every request, so a 200 response means the API can reach both. The Docker image's built-in healthcheck (faynoSync healthcheck) probes this endpoint.
If you encounter issues or receive a different status, further investigation may be necessary to identify and resolve any problems.
Notes
- This endpoint does not require authentication
- The response is immediate and lightweight
- Use this for load balancer health checks and monitoring systems
- A non-200 response indicates the service is not healthy