News for hackers. Stuff that matters.
Re:Show HN: BreakerMachines – Modern Circuit Breaker for Rai... by seuros on Thursday July 10, 2025 @06:47AM (#44519510)
Circuit breakers are inherently bi-modal (all-or-nothing) while token buckets provide smooth pressure control like cruise control vs an on/off switch.

BreakerMachines focuses specifically on failure protection rather than rate limiting. Circuit breakers and token buckets solve different problems:

- Circuit breakers: Reactive failure protection (stop calling broken services)

- Token buckets: Proactive rate control (smooth request throttling)

They're complementary patterns. I actually have a rate limiter gem with token buckets, sliding windows, and distributed rate limiting, but I will open source it when my ship lands on a planet or a moon. Still navigating hyperspace.

Thanks for the feedback

There are no comments on this comment yet.