Circuit Breaker Threshold Calculator
Determine circuit breaker error and latency thresholds to protect downstream services.
About Circuit Breaker Threshold Calculator
A circuit breaker opens once the observed error rate in its evaluation window exceeds a configured threshold, but only after a minimum request volume has been observed to avoid tripping on statistically insignificant samples: opens_when error_rate > threshold% AND volume ≥ min_volume. Once open, the breaker rejects requests immediately (failing fast) until the half-open timeout elapses, at which point it allows a limited number of trial requests through to test whether the downstream dependency has recovered.
Formula
trips_when = error_count >= threshold within rolling_window_sec
- error_count
- Number of consecutive failures or errors
- threshold
- Failure count that triggers the circuit breaker
- rolling_window_sec
- Time window for counting failures (seconds)
Worked example
With the default values below, Circuit Breaker Threshold Calculator returns Circuit Breaker State of Open. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Requests in Windowaccepts 1–10,000,000 requests
- 200 requests
- Failed Requests in Windowaccepts 0–10,000,000 requests
- 45 requests
- Error Rate Thresholdaccepts 0–100 %
- 20 %
- Minimum Request Volumeaccepts 0–10,000,000 requests
- 20 requests
- Half-Open Timeoutaccepts 1–100,000 seconds
- 30 seconds
Results
- Circuit Breaker State
- Open
- Observed Error Rate
- 22.50%
- Margin to Threshold
- -2.50 pp
- Half-Open Retry After
- 0.50 minutes
Step by step
- 1Observed error rate: failed ÷ total= 22.50%
- 2Sufficient volume check= yes
- 3Breaker decision: error rate > threshold?= Open
Assumptions and limits
- The result is derived only from the 5 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Why is a minimum request volume required before evaluating the threshold?
With very few requests, a single failure can produce a misleadingly high error rate (e.g. 1 failure out of 3 requests = 33%) — requiring a minimum sample size before evaluating prevents the breaker from flapping open on statistical noise during low-traffic periods.
What happens during the half-open state?
The breaker allows a small number of trial requests through to the downstream dependency; if they succeed, the breaker closes and resumes normal traffic, if they fail, it reopens and restarts the half-open timeout, backing off from a struggling dependency.
What's a reasonable error threshold?
20-50% is common for general-purpose circuit breakers, tuned lower for critical dependencies where you want to fail fast sooner, and higher for naturally noisy or already-degraded-tolerant dependencies where occasional errors are expected and acceptable.
How does circuit breaking interact with retries?
Retries should generally be attempted before the circuit breaker's error count is affected by transient failures, or the breaker should count only post-retry failures — otherwise aggressive retrying can itself inflate the observed error rate and trip the breaker prematurely under partial degradation.
Related Calculators
- Retry Policy Calculator
- Timeout Configuration Calculator
- Service Mesh Health Score Calculator
- Rate Limit Calculator
- API Gateway Throughput Calculator
- Blue-Green Deployment Calculator
- Canary Deployment Calculator
- Envoy Proxy Capacity Calculator
- Ingress Controller Capacity Calculator
- Istio Sidecar CPU Calculator
You might also need
- Rate Limit CalculatorCommonly used together
- Retry Policy CalculatorCommonly used together
- Timeout Configuration CalculatorCommonly used together
- Service Mesh Health Score CalculatorCommonly used together
- Canary Deployment CalculatorAlso in Service Mesh & API Gateway
- API Gateway Throughput CalculatorAlso in Service Mesh & API Gateway
