{
  "id": 12710370,
  "title": "Express.js Production Health Check Endpoints: Node.js Readiness, Liveness, and 5xx Monitoring",
  "url": "https://urgent.news/2026/10/07/express-js-production-health-check-endpoints-node-js-readiness",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-07T20:55:50.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/vespasianblack3884/expressjs-production-health-check-endpoints-nodejs-readiness-liveness-and-5xx-monitoring-ema"
  },
  "original_language": "en",
  "account": "When monitoring the health of an Express.js production service, it is crucial to separate liveness from readiness endpoints. The liveness check determines if the Node.js process can still serve events on its loop, while readiness indicates whether the instance can receive customer traffic. By exposing two distinct endpoints, operators can make informed decisions during incidents without inadvertently causing a restart loop due to transient dependency problems.\n\nThe liveness endpoint should return success if the process is responsive, regardless of the status of dependent services like databases. Conversely, the readiness endpoint should only return success when all required dependencies are functioning correctly and bounded checks have passed. This separation allows operators to remove unready instances without exacerbating the issue, while also enabling comparison of evidence from different releases before performing a rollback.\n\nWhen implementing these health check endpoints, it is essential to include a release identifier and timestamp in structured logs, without exposing sensitive information such as secrets or customer message bodies. The endpoints should also reveal minimal internal topology to maintain security and simplicity. Dependency checks should be short-lived, with timeouts shorter than the probe interval to avoid thundering herd problems. Caching dependency results can help reduce the load on downstream services.\n\nLogging should focus on a small set of events, including service_starting, service_ready, dependency_failed, service_draining, and service_stopped. These fields provide enough context to reconstruct the incident after the alert has been raised. Sensitive customer information should be pseudonymized, and only essential details such as operation, dependency, release, correlation ID, and failure class should be recorded. This approach ensures that alerts are lossy summaries, while the retained evidence is rich enough to facilitate a thorough investigation.\n\nWhen implementing an evidence collection system, it is recommended to use a monitoring tool like Infrai, which provides a self-describing API for accessing verified logs. However, it is important to note that Infrai is not a complete alerting system and should be used in conjunction with a separate notification system for managed escalation and regional probes. The logging service does not provide features like per-user deletion, bulk export, or retention configuration, so these capabilities must be implemented separately if required by the organization's policies.",
  "summary": "An Express production health check endpoint is useful only if it helps an operator make a safe decision during an incident. For a customer-support service running on Node.js, the real constraint is evidence retention: after a bad deployment, can the team distinguish liveness from readiness, find the relevant 5xx errors and logs, and explain which customer requests failed before and after…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}