Failure Threshold
The condition that trips a circuit breaker — best expressed as a failure rate over a rolling window with a minimum request volume, not as a consecutive-failure count.
A count of consecutive failures is the naive configuration and it behaves badly in both directions. A dependency failing 40% of requests never produces five consecutive failures, so the breaker never trips while nearly half of traffic is broken. Meanwhile a low-traffic endpoint trips on three unlucky requests.
The workable formulation has three parts:
A failure rate over a rolling window — say more than 50% of requests failing. A minimum request volume in that window, below which the breaker never trips, because 2 failures out of 3 requests is not evidence of anything. A definition of failure that includes timeouts and slow responses, not just error codes. A dependency answering successfully in nine seconds is failing, and a breaker that only counts 5xx will happily let every thread block on it.
Tune from the dependency's real behaviour, and be aware that a breaker tripping is itself an outage for that path — so the fallback matters more than the threshold does.