Kubernetes and Cloud Native Associate (KCNA)Cloud Native ArchitectureHard

A team is designing a highly available, fault-tolerant microservices application. They want to ensure that even if a critical database service experiences a temporary outage, the dependent services do not crash or become unresponsive indefinitely, but instead gracefully degrade or retry later. Which resilience pattern is most appropriate for preventing cascading failures in this scenario?

  1. ACircuit Breaking
  2. BLoad Balancing
  3. CService Discovery
  4. DAPI Gateway
Show answer & explanation

Correct answer: A. Circuit Breaking

Circuit Breaking is a resilience pattern that prevents a service from repeatedly trying to access a failing downstream service, thus avoiding resource exhaustion and cascading failures. Instead, it 'breaks the circuit' and allows the failing service time to recover.

Why the other options are wrong

  • B. Load balancing distributes requests across healthy instances, not designed for preventing calls to failing services.
  • C. Service discovery helps locate services but doesn't implement resilience against service failures.
  • D. An API Gateway is an entry point, not primarily a resilience pattern for inter-service communication failure handling.

Circuit Breaking

A resilience pattern in distributed systems that prevents a service from repeatedly invoking a failing remote service, thereby preventing cascading failures and allowing the failing service to recover.

  • Prevents cascading failures.
  • Opens a 'circuit' when failures exceed a threshold.
  • Trips to 'half-open' state to re-test the service.
  • Protects both the calling and called service.

Memory trick: Resilience patterns are like a doctor's toolkit for sick microservices.

More Cloud Native Architecture questions