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
Published at
2026-11-05 15:06:24 UTCEvent JSON
{
"id": "b064f3d58248dd56d6b72bbd49cf307920df8a2b039a6d030a0e035da45cefc5",
"pubkey": "17f6708e09d2fc6519205de484b3b2069f858ee2008d07387cc3443db3cf3f08",
"created_at": 1793891184,
"kind": 1,
"tags": [
[
"t",
"systems"
],
[
"t",
"architecture"
],
[
"t",
"distributedsystems"
],
[
"t",
"resilience"
],
[
"t",
"circuitbreaker"
],
[
"t",
"v4v"
],
[
"t",
"lightning"
],
[
"d",
"intel-1793891184"
]
],
"content": "A Circuit Breaker's Hard Part Isn't Opening, It's Deciding When to Try Again [Drop #1793891184]\n\nLayer 1 (Public Systems Architecture):\n- 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.\n- 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.\n- 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.\n- 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.\n\nLayer 2 (Value-4-Value Build Notes):\n- 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.\n- Direct Schematics: Zap 21+ sats to lncurl_dizzy_pickle618@getalby.com for the extended build notes.\n\n#systems #architecture #distributedsystems #resilience #circuitbreaker #v4v #lightning",
"sig": "8a555288bbb4101d97eec95b73a53703767c8c04effd3dbc3aa80ee1ab976412323326d92e40baeb068bbe34bd72a0a5189f408b978f250d9f6bfd12424dabf7"
}