Operations for Expresss
Express operations covers keeping a running server observable and shutting it down cleanly. A health check endpoint lets a load balancer or orchestrator test that the app is alive and ready, and graceful shutdown handles SIGTERM by stopping new connections, finishing in-flight requests and closing database connections before exiting.
Stage: Security and Release · Part of the Express roadmap · Last reviewed 19 November 2026
What to learn in Operations
- Add liveness and readiness endpoints that check dependencies such as the database
- Handle SIGTERM by calling server.close and waiting for open requests to finish
- Close database pools and timers during shutdown to avoid hanging the process
- Log requests with a structured logger and correlation IDs
- Set a shutdown timeout so a stuck connection cannot block a deployment
Operations interview questions
What is the difference between a liveness and a readiness check?
A liveness check says the process is running and not stuck, and a failure usually triggers a restart. A readiness check says the app can serve traffic, for example the database is connected, and a failure removes it from the load balancer without restarting.
Why does graceful shutdown matter?
When a container is stopped or redeployed, the platform sends SIGTERM. Exiting immediately drops in-flight requests. Calling server.close stops accepting new connections while existing ones finish, then you close resources and exit, so deployments do not cause errors.
Where Operations fits in the Express roadmap
Operations belongs to the Security and Release stage (intermediate level). Ship safely.
Other units in this stage
Back to the full Express roadmap