If the service fails twice quickly and then succeeds on the third try, what will be the outcome?
medium
A. The call succeeds after two retries within timeout
B. The call never retries and returns failure
C. The call times out before any retry
D. The call fails immediately without retries
Solution
Step 1: Analyze retry behavior
Retry(2) means the system will try up to 3 times total (1 initial + 2 retries) if failures occur.
Step 2: Consider timeout and success timing
Timeout(500) means each try waits up to 500ms. If the third try succeeds within this time, the call succeeds.
Final Answer:
The call succeeds after two retries within timeout -> Option A
Quick Check:
Retries allow success after failures = D [OK]
Hint: Retries add attempts; timeout limits each try duration [OK]
Common Mistakes:
Assuming no retries happen
Confusing total timeout with per-try timeout
Thinking timeout cancels retries immediately
4. A microservice uses a circuit breaker to prevent cascading failures. The circuit breaker is set to open after 5 failures but it opens after only 2 failures. What is the likely cause?
medium
A. The failure count threshold is incorrectly configured
The circuit breaker opens after a configured number of failures to stop calls temporarily.
Step 2: Analyze early opening
If it opens after 2 failures instead of 5, the threshold setting is likely wrong or misread.
Final Answer:
The failure count threshold is incorrectly configured -> Option A
Quick Check:
Early circuit breaker open = A [OK]
Hint: Check config values when behavior differs from expectations [OK]
Common Mistakes:
Assuming circuit breaker ignores failures
Thinking service is healthy when breaker opens
Believing circuit breaker is disabled if it opens
5. You design a microservices system with multiple dependent services. To prevent cascading failures, which combination of resilience patterns is best to apply?
hard
A. No retries, no timeouts, and no bulkheads
B. Retries with long timeouts and no circuit breakers
C. Circuit breakers, bulkheads, and short timeouts
D. Retries with infinite timeout and no bulkheads
Solution
Step 1: Identify resilience patterns that isolate failures
Circuit breakers stop calls to failing services; bulkheads isolate failures to parts of the system; short timeouts prevent long waits.
Step 2: Evaluate options for preventing cascading failures
Circuit breakers, bulkheads, and short timeouts combines these patterns effectively to keep the system stable and responsive.
Final Answer:
Circuit breakers, bulkheads, and short timeouts -> Option C
Quick Check:
Best resilience combo isolates and limits failure impact = A [OK]
Hint: Use circuit breakers + bulkheads + short timeouts to isolate failures [OK]
Common Mistakes:
Using long or infinite timeouts causing delays
Skipping circuit breakers leading to cascading failures