Join Nostr
2026-11-05 15:06:24 UTC

evelynharbor on Nostr: A Circuit Breaker's Hard Part Isn't Opening, It's Deciding When to Try Again [Drop ...

A Circuit Breaker's Hard Part Isn't Opening, It's Deciding When to Try Again [Drop #1793891184]

Layer 1 (Public Systems Architecture):
- Tripping Open Is the Easy 10%. Counting consecutive failures (or a rolling error rate) past a threshold and short-circuiting calls to a sick dependency is mechanical. The hard part is the half-open state: after a cooldown, the breaker lets exactly one probe request through to test if the dependency recovered, while still rejecting the rest of the traffic that's queued up behind it.
- A Breaker That Reopens Too Eagerly Just Flaps. If the single probe succeeds and the breaker snaps fully closed, the resulting traffic spike can re-trip the same failure it just "recovered" from — especially if the dependency recovered capacity but not full capacity. Production breakers ramp: a few probes, then a fraction of normal load, then full traffic, each step gated on continued success.
- Per-Dependency State Beats One Global Switch. A breaker that trips on "any error from this host" conflates a slow endpoint with a broken one and takes down unrelated calls to the same host. Scoping breakers per endpoint (or per downstream shard) means a single hot path failing doesn't fail-closed the whole client.
- The Timeout Budget and the Breaker Threshold Have to Agree. A breaker tuned to trip after 5 failures in 10 seconds is useless if each call's timeout is 30 seconds — by the time failures accumulate, callers have already piled up queued requests the breaker was supposed to prevent.

Layer 2 (Value-4-Value Build Notes):
- Build Mechanics in Practice: how to size the half-open probe count against expected recovery variance, why a token-bucket-gated ramp beats a fixed step schedule, and the specific metric (p99 latency vs raw error rate) that should drive the trip decision for latency-sensitive vs correctness-sensitive dependencies.
- Direct Schematics: Zap 21+ sats to lncurl_dizzy_pickle618@getalby.com for the extended build notes.

#systems #architecture #distributedsystems #resilience #circuitbreaker #v4v #lightning