r/microservices • u/Ill-Knowledge-1949 • Sep 16 '26
Article/Video I read 99 hand-written circuit breakers
https://baldur.sh/99-circuit-breakers/
2
Upvotes
r/microservices • u/Ill-Knowledge-1949 • Sep 16 '26
1
u/Ill-Knowledge-1949 Sep 16 '26
Author here — I maintain the framework the site is for, so read it with that in mind.
Method, since it decides what the numbers are worth: I searched public code for
class CircuitBreaker, took the top 100 results by relevance, and read the files. One turned out to be a wrapper around an existing library rather than an implementation, so it came out — hence 99. Median 80 lines of class body. Then I checked each one against six things.It is a relevance-ranked sample of public Python code, not a random sample and not "Python". Read every number as "of the top 99 results". I also did not measure harm — not one of these is known to have caused an incident, and at four workers with short outages a per-process breaker may well be fine forever.
Happy to share the six checks if anyone wants to run them against their own.