Skip to content

Circuit breakers and bulkheads

Stop calling a dependency that is failing, and stop one slow dependency from taking every thread: breaker states, trip thresholds and bulkhead sizing.

30 min8 steps

By the end you can
  • Trace a circuit breaker through closed, open and half-open, and say what each state protects
  • Calculate when a failure-rate breaker trips and choose its window, minimum calls and scope
  • Size a bulkhead with Little's law and predict the throughput it admits when the dependency hangs

Failing fast beats failing slowly

No breaker

  • Each call waits a full timeout
  • Threads pile up
  • Caller dies too

Breaker open

  • Calls fail in microseconds
  • Threads stay free
  • Dependency gets quiet to recover
A circuit breaker (Nygard, Release It!) fails calls fast after evidence of failure.

A recommendations service is timing out on every call after 2 s. A breaker in front of it opens. What changes for the product page that calls it?

Answer this step to continue.