Health check
Langbly has two health check endpoints: a public liveness check and an internal, authenticated dependency check.
GET /health​
This public, unauthenticated endpoint returns a simple liveness response. It does not call the database, Redis, or perform any translation. It responds within milliseconds and is guaranteed not to fail due to downstream dependency issues.
{
"ok": true,
"service": "langbly-workers",
"region": "global",
"timestamp": "2025-04-02T12:00:00Z"
}
- The
regionfield is"global"on the global endpoint (api.langbly.com) and"eu"on the EU endpoint (eu.langbly.com). - The
timestampis an ISO 8601 date string.
GET /health/deep (internal, requires admin authentication)​
A deeper health check that tests the database, Redis cache, and performs a real translation to confirm end-to-end functionality.
- Requires an
Authorization: Bearer <ADMIN_API_KEY>header. Not intended for regular API users, only for internal or operational monitoring. - Each dependency returns
"ok","fail", or"skip"(if not configured).
Frequently asked questions​
Why doesn't /health check the database?​
The previous implementation included database and Redis calls in the public health endpoint. This caused load balancers to mark the service as unreachable when a slow or failing dependency occurred, even though the worker process itself was healthy. /health now only confirms the process is alive and responding, isolating dependency issues to separate monitoring paths.
Is there a public deep health check?​
No. The GET /health/deep endpoint requires admin authentication and is intended solely for internal operational monitoring. Regular API users should use GET /health for liveness checks and rely on other endpoints (like translation API calls) to verify end-to-end functionality.
How does the region differ between endpoints?​
When calling the global endpoint (api.langbly.com), the region field is "global". When using the EU endpoint (eu.langbly.com), it returns "eu". No other regions are currently supported.
Can I use /health to monitor my application's connectivity to Langbly?​
Yes. Because /health is fast and unauthenticated, it is ideal for uptime monitoring and load balancer health checks. A successful response ("ok": true) confirms that the Langbly workers are running and reachable. However, it does not verify the availability of dependent services like the database or cache. Use a test translation request for full end-to-end verification.