Microservices - Resilience PatternsHow can you design a health check pattern that avoids false negatives when a dependent service is temporarily slow?AImmediately mark unhealthy on first failureBUse a timeout and retry logic before marking unhealthyCIgnore dependent service status completelyDReturn 404 status for slow dependenciesCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand false negatives in health checksTemporary slowness can cause incorrect unhealthy status if no retries are done.Step 2: Implement timeout and retryRetrying before marking unhealthy reduces false negatives due to transient issues.Final Answer:Use a timeout and retry logic before marking unhealthy -> Option BQuick Check:Retries prevent false negatives in health checks [OK]Quick Trick: Retry before failing health check to avoid false negatives [OK]Common Mistakes:MISTAKESFailing immediately on first failureIgnoring dependency statusUsing wrong HTTP status codes
Master "Resilience Patterns" in Microservices9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepArchTryChallengeDesignRecallScale
More Microservices Quizzes Authentication and Authorization - Service-to-service authentication - Quiz 3easy Authentication and Authorization - Centralized vs distributed auth - Quiz 8hard Event-Driven Architecture - Why events decouple services - Quiz 15hard Event-Driven Architecture - Event types (domain, integration, notification) - Quiz 10hard Event-Driven Architecture - Event types (domain, integration, notification) - Quiz 1easy Monitoring and Observability - Distributed tracing (Jaeger, Zipkin) - Quiz 5medium Monitoring and Observability - Why observability is critical in distributed systems - Quiz 13medium Orchestration with Kubernetes - Horizontal Pod Autoscaler - Quiz 15hard Resilience Patterns - Timeout pattern - Quiz 6medium Service Mesh - Mutual TLS between services - Quiz 7medium