Hacker News new | ask | show | jobs
by seuros 340 days ago
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