Interview replay

Full round replay — circuit breakers

10 minintermediate212 yrs

Timed verbal replay with pass/fail criteria per follow-up.

How to run this

Answer out loud, timed. Do not read the entry first. Then compare against "The Answer" and "Interviewer's Next Move" and mark yourself.

The opener

What does a circuit breaker actually do?

Budget: 45 seconds. Going long here is itself a fail signal.

Follow-ups

  1. 1. “Name the three states and what each one does.

    Testing: Whether half-open is understood or just listed.

    Scoring

    Pass: Closed — calls pass through and failures are counted. Open — calls are rejected without touching the dependency. Half-open — after a cool-down, one trial call decides whether to close or re-open.

    Fail: Lists the states without saying what half-open is for.

  2. 2. “Why does failing fast help? The request fails either way.

    Testing: The real cost of a failing dependency.

    Scoring

    Pass: Because the cost is threads waiting on timeouts. A rejection is microseconds where a timeout is seconds, so the pool stays free for requests that have nothing to do with that dependency — that is what stops the failure spreading.

    Fail: Talks only about the user seeing an error sooner.

  3. 3. “Why one trial call in half-open rather than closing fully?

    Testing: Recovery behaviour.

    Scoring

    Pass: Closing fully sends all the traffic back at a service that may still be dead. One probe is enough to learn and small enough not to be load on something still recovering. A failed probe re-opens immediately.

    Fail: Thinks half-open means a fraction of traffic passes.

  4. 4. “Retry and breaker together — which wraps which?

    Testing: The ordering, and why.

    Scoring

    Pass: Retry inside the breaker, so a retried call is one logical attempt. Outside, the retries hammer a breaker trying to stay open and each user request consumes several rejections.

    Fail: Says it does not matter.

  5. 5. “What must the underlying call have for the breaker to work at all?

    Testing: The prerequisite everyone forgets.

    Scoring

    Pass: A timeout. A hung dependency throws nothing, so no failure is counted, the breaker stays closed and threads still queue. The timeout is the first line of defence; the breaker is the second.

    Fail: Does not mention timeouts.

  6. 6. “Your breaker is set to five consecutive failures and never opens, while half of all requests fail. Why?

    Testing: The most common misconfiguration.

    Scoring

    Pass: Every success resets the counter, so five in a row essentially never happens at a 50% failure rate. Count a failure rate over a rolling window instead — consecutive counting only catches total failure.

    Fail: Suggests lowering the threshold.

  7. 7. “One breaker for all downstreams, or one each?

    Testing: Blast radius.

    Scoring

    Pass: One per dependency. A breaker is a statement about one service; sharing one lets an unimportant failing dependency block calls to a healthy critical one.

    Fail: Sees no problem with sharing.

  8. 8. “What is a bulkhead and how is it different?

    Testing: Two patterns, two jobs.

    Scoring

    Pass: A cap on how much of your capacity one dependency can consume — typically a separate pool per downstream. It bounds damage while failures are happening; the breaker stops calls after they have.

    Fail: Treats them as the same idea.

  9. 9. “Does the breaker protect the dependency?

    Testing: Who the pattern is for.

    Scoring

    Pass: It protects the caller. Reduced load may help the dependency recover, but the reason to have one is that your service stays responsive while theirs is not.

    Fail: Says it exists to give the downstream a break.

Score yourself

9/9 — you can configure one and defend the numbers 7-8 — solid; the rate-versus-run and retry-ordering questions are where points go 5-6 — you know the three states but not the consequences; redo the Challenge 0-4 — run the Warm-up and build the state machine

← Back to What does a circuit breaker actually do?