Bird
0
0

How can you design a health check pattern that avoids false negatives when a dependent service is temporarily slow?

hard📝 Trade-off Q9 of 15
Microservices - Resilience Patterns
How can you design a health check pattern that avoids false negatives when a dependent service is temporarily slow?
AImmediately mark unhealthy on first failure
BUse a timeout and retry logic before marking unhealthy
CIgnore dependent service status completely
DReturn 404 status for slow dependencies
Step-by-Step Solution
Solution:
  1. Step 1: Understand false negatives in health checks

    Temporary slowness can cause incorrect unhealthy status if no retries are done.
  2. Step 2: Implement timeout and retry

    Retrying before marking unhealthy reduces false negatives due to transient issues.
  3. Final Answer:

    Use a timeout and retry logic before marking unhealthy -> Option B
  4. Quick Check:

    Retries prevent false negatives in health checks [OK]
Quick Trick: Retry before failing health check to avoid false negatives [OK]
Common Mistakes:
MISTAKES
  • Failing immediately on first failure
  • Ignoring dependency status
  • Using wrong HTTP status codes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes