liveBook · Manning

Half-open state

As explained in Grokking Software Architecture

A circuit-breaker state that allows limited test calls to determine whether a failed dependency has recovered.

After a cooldown, a circuit breaker enters the half-open state and cautiously allows one test request to reach the recovering dependency. Success closes the breaker and resumes normal traffic; failure reopens it and restarts the cooldown. section 10.3.3

Testing a payment API

After a payment API outage, wait for the cooldown, then send one test request. If it succeeds, resume normal traffic; if it fails, keep the breaker open. In a Black Friday checkout plan, choose a defensible cooldown rather than treating one duration as universally right. section 10.3.3 section 10.8

How Grokking Software Architecture covers it

How deep it goes
Traces the cooldown, single-request probe, and success or failure transitions, while deferring implementation tools.
Examples
Uses a Payment API test ping and a FlakyPayments Black Friday scenario to illustrate recovery checks and cooldown choices.
What you can do after
Apply the state by choosing a cooldown and reasoning about the test ping’s result; exact timing remains a deliberate design choice.
How it connects
Connects the circuit breaker’s Open and Closed states with cooldowns and downstream API recovery.

Also explained in

Compare how 2 books explain half-open state →

Related concepts

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