
This URL checks our application’s health and throws an error code if the application is unhealthy. Setting up a health check boils down to creating a health check URL.
Termius timeout install#
To use Terminus with NestJS, we need to install the package by using the below command: You can check out godaddy/terminus for more details on Terminus. Together, both these checks give us a complete picture of our application health. On the other hand, readiness health check is used to determine whether the application is ready to accept incoming requests. Liveness health check determines whether the container running the application is up. The package brings the capabilities of Terminus to the NestJS ecosystem.īut what is the difference between Liveness and Readiness health checks? It provides features such as graceful shutdown and Kubernetes liveness/readiness health checks for HTTP applications. Terminus is an open-source project by GoDaddy. Health checks in NestJS are handled through the Terminus integration. It is equally important to distinguish what makes a service healthy or unhealthy. However, health check API is simply an implementation. If the health check API returns an error status code, the infrastructure service can take appropriate action such as trying to restart the application or send a notification. This can include checking of database connections, system properties, disk availability and resource availability.īasically, the infrastructure hosting your application keeps checking or pinging this endpoint periodically. The special health check API endpoint internally triggers an overall health check of the service. Conclusion 1 – What is a Health Check API?Ī health check API is a special REST endpoint that can be used to validate the status of the service along with its dependencies.

