liveBook · Manning

Circuit breaker pattern

As explained in Clean Applications with Hexagonal Architecture

A resilience pattern that temporarily blocks calls to an unresponsive dependency and permits limited probes to determine when it has recovered.

A circuit breaker bounds the cost of a synchronous call to an unresponsive dependency. After a configured threshold of timeouts or transient failures, it opens and rejects calls instead of making callers wait through repeated timeouts. section 11.5

A basic breaker policy:

  • Open after the configured failure threshold; reject calls while open. section 11.5
  • After a cooldown, permit a limited probe. Close on success; reopen on failure. section 11.5
  • Return a fast dependency-unavailable failure when required work cannot safely proceed. section 11.5

Author validation

If an author service is unavailable during article approval, fail with DependencyUnavailable rather than guessing whether approval is valid. section 11.5

How Clean Applications with Hexagonal Architecture covers it

How deep it goes
Defines thresholds, open-state rejection, cooldown probes, and success or failure transitions without detailing implementation mechanics.
Examples
Uses author-service validation during article approval to show when dependency failure must block work.
What you can do after
Configure a breaker to reject calls during outages and probe recovery after a cooldown.
How it connects
Connects circuit breakers with retries, timeouts, transient failures, and synchronous dependency calls.

Also explained in

Compare how 14 books explain circuit breaker pattern →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Clean Applications with Hexagonal Architecture. The section links point to the parts of the book it draws on.