Microservices - Resilience Patterns
What will the health check endpoint return if the service is running but a dependent cache is unreachable?
function healthCheck() {
if (service.isRunning() && cache.isAvailable()) {
return { status: 200, message: 'OK' };
} else {
return { status: 500, message: 'Dependency Failure' };
}
}