Erlang app implementing a circuit breaker
Top 62.0% on sourcepulse
This Erlang library provides a circuit breaker pattern implementation to prevent cascading failures in distributed systems. It's designed for Erlang developers building resilient applications, offering a robust mechanism to isolate failing services and improve overall system stability.
How It Works
Fuse implements circuit breakers as stateful processes that wrap calls to potentially failing services. It tracks failure rates within configurable time windows. When a threshold is exceeded, the circuit "blows," preventing further calls to the failing service for a set duration, after which it attempts to "heal." This approach decouples failure detection from the core service logic and allows for graceful degradation.
Quick Start & Requirements
fuse
application: application:start(fuse).
fuse
in your release boot script.fuse:install(database_fuse, {standard, MaxR, MaxT}, {reset, 60000}).
Highlighted Details
standard
and fault_injection
fuse types.fuse_stats_plugin
(ETS, folsom, exometer, prometheus).Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
async_dirty
context for fuse:ask
is noted to have rare race conditions.rand:uniform()
calls.3 years ago
Inactive