Microsoft Certified: DevOps Engineer ExpertImplement a Site Reliability Engineering (SRE) strategyEasy
A DevOps team is managing a critical microservices application on Azure. They have observed that during peak load, some backend services occasionally become unresponsive, leading to cascading failures in downstream services. The team wants to implement a mechanism that can temporarily prevent a service from making requests to an unresponsive dependency, allowing the dependency time to recover and preventing further resource exhaustion. Which design pattern should they implement?
- ACircuit Breaker
- BSaga Pattern
- CIdempotent Retry
- DBulkhead
Show answer & explanationAnswer & explanation
Correct answer: A. Circuit Breaker
The Circuit Breaker pattern is specifically designed to prevent cascading failures by stopping requests to an unresponsive service, giving it time to recover. This matches the exact problem description of preventing further resource exhaustion when a dependency is unresponsive.
Why the other options are wrong
- B. The Saga pattern manages distributed transactions to maintain data consistency, which is unrelated to preventing cascading failures from unresponsive services.
- C. Idempotent Retry ensures that multiple identical requests have the same effect as a single request, which is not the primary goal here.
- D. The Bulkhead pattern isolates components to prevent failures in one from affecting others, but it doesn't actively stop calls to an unresponsive service.
Circuit Breaker Pattern
A design pattern used in distributed systems to prevent cascading failures by stopping requests to a failing service, allowing it time to recover.
- Prevents an application from repeatedly trying to invoke a service that is likely to fail.
- Monitors for failures and 'trips' when a threshold is met.
- Allows the failing service to recover and prevents resource exhaustion.
Memory trick: Circuit Breaker: Stop the flow if it's broken.