NestJS · Senior · Question 28 of 75
What should a readiness check in Nest verify, and what should liveness avoid?
- 1Both should check every external API
- 2Liveness should check the database and restart on failure
- ✓Correct answer: Readiness checks dependencies needed to serve traffic (DB, cache); liveness should avoid external dependencies so an outage doesn't restart every pod
Explanation
A database outage that restarts all pods makes recovery worse. Liveness answers only 'is this process stuck?'.