Kubernetes and Cloud Native Associate (KCNA)Cloud Native ArchitectureMedium
A financial services company is building a new real-time fraud detection system using a microservices architecture. Due to the critical nature of the service, they need to ensure that the failure of one microservice does not cascade and bring down the entire system. They want to isolate resources and limit the impact of failures. Which resilience pattern should they implement?
- ABulkhead Pattern
- BCircuit Breaker
- CRetry Pattern
- DSaga Pattern
Show answer & explanationAnswer & explanation
Correct answer: A. Bulkhead Pattern
The Bulkhead Pattern isolates resources by partitioning them into fault domains, preventing a failure in one part of the system from consuming all available resources and causing cascading failures across the entire system. This is crucial for critical applications like fraud detection.
Why the other options are wrong
- B. Circuit Breaker prevents repeated calls to a failing service but doesn't isolate resources to prevent resource exhaustion from other services.
- C. Retry Pattern involves automatically retrying failed operations, which doesn't address resource isolation for cascading failures.
- D. Saga Pattern manages distributed transactions across multiple services, which is unrelated to fault isolation for resource consumption.
Bulkhead Pattern
A design pattern that isolates elements of a system into pools so that if one element fails, the others can continue to function. It's named after the compartments of a ship's hull.
- Prevents cascading failures due to resource exhaustion.
- Partitions resources (e.g., thread pools, connection pools).
- Increases system resilience and fault tolerance.
- Limits the blast radius of failures.
Memory trick: Bulkheads build barriers to block blast.