Skip to main content
InterviewHubPRO
Section Overview
Q45

Question 45 of 50

Part 3: Microservices, Distributed Systems & Observability (25 - 35)

90%
Spring Boot & Microservices (50 Qs)•Part 3: Microservices, Distributed Systems & Observability (25 - 35)

Resilience4j: Circuit Breakers and Bulkheads in Spring Boot.

senior LevelSystem DesignMicroservices

In Simple Words: Resilience4j protects services from cascading downstream failures:

  • Circuit Breaker (@CircuitBreaker(name = "payment", fallbackMethod = "fallback")): If error rate exceeds 50%, the circuit transitions to OPEN, failing fast without making network calls to allow the downstream system to recover.
  • Bulkhead: Limits concurrent calls to a downstream service (e.g. max 20 threads) to prevent one slow dependency from exhausting all server resources.