A health check Docker (లేదా orchestrator)కు container యొక్క application నిజంగా పని చేస్తున్నదో లేదా కేవలం running ఉందో అని నిర్ణయించడానికి చెప్పుతుంది. Container యొక్క process పైకి ఉండగా app broken (hung, database కు చేరుకోలేని) ఉండవచ్చు — health checks దీన్ని detect చేస్తాయి కాబట్టి platform ప్రతిస్పందించవచ్చు.
Health check నిర్వచనం
# in a Dockerfile
HEALTHCHECK --interval=30s --timeout=3s --retries=3 \
CMD curl -f http://localhost:3000/health || exit 1
# → Docker runs this command periodically; exit 0 = healthy, non-zero = unhealthy
[, , , ]
