Advanced Resilience Patterns in Spring Boot: Circuit Breaker & Retry
An advanced quiz on implementing Circuit Breaker and Retry patterns in Spring Boot applications.
Questions in this quiz
10 questions on Advanced Resilience Patterns in Spring Boot: Circuit Breaker & Retry. Work through them here, then start the quiz to answer them and see your score.
1.In Spring Boot, which library is commonly used to implement the Circuit Breaker pattern?
- AResilience4j
- BHystrix
- CSpring Cloud Config
- DNetflix Ribbon
2.What is the primary purpose of a Circuit Breaker in a microservices architecture?
- ATo cache responses
- BTo limit API rate
- CTo prevent cascading failures
- DTo load balance requests
3.In Resilience4j, what state does a Circuit Breaker enter after a failure threshold is reached?
- AHalf-Open
- BLocked
- COpen
- DClosed
4.Which configuration property in Resilience4j specifies the number of permitted calls in the Half-Open state?
- AslidingWindowSize
- BpermittedNumberOfCallsInHalfOpenState
- CfailureRateThreshold
- DwaitDurationInOpenState
5.What is the role of the Retry pattern in a Spring Boot application?
- ATo cache responses
- BTo secure API endpoints
- CTo retry failed requests
- DTo load balance requests
6.In Spring Retry, which attribute specifies the maximum number of retry attempts?
- Atimeout
- BretryOn
- CbackOff
- DmaxAttempts
7.How does the Circuit Breaker pattern improve system resilience?
- ABy caching data
- BBy increasing throughput
- CBy isolating failures
- DBy reducing latency
8.Which Resilience4j annotation is used to apply a Circuit Breaker to a method in Spring Boot?
- A@Bulkhead
- B@RateLimiter
- C@Retry
- D@CircuitBreaker
9.What is the default sliding window type in Resilience4j's Circuit Breaker?
- ACount-based
- BEvent-based
- CRequest-based
- DTime-based
10.In Spring Retry, what does the 'backOff' attribute control?
- AThe number of retries
- BThe delay between retries
- CThe timeout for each attempt
- DThe exception to retry on