
Health Checks for Node.js Apps — What They Are, Why They Matter, and How to Build Them
A health check is how your infrastructure answers the question: "Is this instance actually working right now?" Without one, a load balancer will happily route traffic to an instance whose database connection pool is exhausted, whose memory is full, or whose app started but can't reach any external services. The process is running — but it's not healthy. Health checks fix this by giving infrastructure a reliable signal to act on. Who Uses Health Checks Three pieces of infrastructure rely on your health endpoint: Process managers (Oxmgr, PM2) — use health checks to determine when a newly spawned process is ready to receive traffic during rolling restarts. Without this, the manager might route traffic to a process that started but isn't ready. See Zero-Downtime Deployment for the full rolling restart flow. Load balancers (Nginx, HAProxy, AWS ALB) — poll health endpoints continuously. If an instance fails, the load balancer stops routing to it and marks it as down. Container orchestrators
Continue reading on Dev.to
Opens in a new tab




