awesome-everything RU
↑ Back to the climb

Backend Architecture

Circuit breakers: multiple-choice review

Crux Multiple-choice synthesis across the circuit-breaker unit — fast-fail, the three-state machine, trip thresholds, bulkheads, fallbacks, and fleet-scale failure modes.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at senior altitude — in orbit
◷ 13 min

Six questions that cut across the whole unit. Each mirrors a call you make in a real incident — not a definition to recite, but a tradeoff to weigh when a downstream is sick and your threads are filling.

Goal

Confirm you can connect fast-fail, the state machine, trip thresholds, bulkheads, fallbacks, and the fleet-scale failure modes — the synthesis the individual lessons built toward.

Quiz

A payment provider slows from 50 ms to 5 s but never returns errors. Within seconds the whole service — including routes that never touch payments — stops responding. Why is the slow case worse than an outright outage, and what is the breaker's role?

Quiz

A breaker is set with a cooldown (resilience4j waitDurationInOpenState) of 1 s in front of a dependency that takes about 20 s to restart after it falls over. What goes wrong?

Quiz

A low-traffic admin endpoint sees about 10 requests/minute. One transient timeout at 3 a.m. trips its breaker for the full cooldown, fast-failing every later request over a single blip. Which setting is the right fix, and why not just raise the failure-rate threshold?

Quiz

Three downstreams — payments, recommendations, search — share one 50-thread pool. Recommendations (the least important) slows to 5 s and the whole service fails, even though its breaker eventually trips. What does a bulkhead add that the breaker alone cannot?

Quiz

A team wraps a flaky recommendations service in a breaker and ships it. During the next incident the breaker never trips and the homepage hangs — the recommendations calls do not error, they take 30 s each. What is the missing piece, and what second piece do they still need once it trips?

Quiz

Service A calls B calls C, each retrying up to 4 times on failure, across a fleet of fifty instances. C wobbles briefly. The wobble becomes a sustained, self-inflicted outage. What is the dominant mechanism, and which fix bounds it?

Recap

The unit’s through-line is one decision chain: a slow dependency starves a shared pool, so a breaker fast-fails it (closed counts failures, open rejects instantly, half-open probes), tripping on a failure rate over a sliding window gated by a minimum-volume floor, with slow counted as failure. A bulkhead isolates the budget per dependency so one sick downstream cannot drain the whole pool before the reactive breaker trips; a timeout converts a hang into a countable failure and a fallback decides what to return when open; and at fleet scale the real danger is retry amplification (4×4×4 = 64), tamed by keeping the breaker above the retries, capping the absolute retry rate, and jittering both retries and half-open probes. Every per-instance safety device needs a fleet-level story.

Continue the climb ↑Circuit breakers: free-recall review
shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources3
expand
  1. 01
  2. 02
  3. 03

Trademarks belong to their respective owners. Editorial reference only.