circuit-breaker-pattern

Community

Prevent cascading failures with circuit breakers

AuthorBrunoAMSilva
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Prevents cascading failures in distributed systems by monitoring calls to external dependencies and fast-failing when repeated errors occur, so the rest of the system stays healthy.

Core Features & Use Cases

  • Three-state state machine: closed, open, and half-open with probe logic to verify recovery.
  • Per-dependency tuning: configure failure thresholds, sliding windows, recovery timeouts, and probe counts per service.
  • Fallbacks and observability: require graceful fallbacks (cache, defaults, queue) and emit state-change events and metrics for alerting and dashboards.
  • Use Case: Protect payment, inventory, or third-party APIs from cascading load when they become slow or return server errors.

Quick Start

Wrap your external API call with a circuit breaker configured with failureThreshold, windowMs, recoveryTimeoutMs, and a fallback such as returning a cached value or a safe default.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: circuit-breaker-pattern
Download link: https://github.com/BrunoAMSilva/my-config/archive/main.zip#circuit-breaker-pattern

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.