# rubyist/circuitbreaker

Circuit Breakers in Go

Repository: https://github.com/rubyist/circuitbreaker
Canonical: https://ross.abutalabs.com/products/circuitbreaker
Language: Go
License: MIT
License Family: permissive
Topics: circuitbreaker, circuit-breakers, go
Last push: 2024-05-15T19:00:14+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4430, "days_push": 840, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1164, forks 112 (observed 2026-08-28T04:03:49.953280+00:00)

## What it is
A Go library implementing the Circuit Breaker pattern for wrapping remote calls. It trips after failures, timeouts, consecutive failures, or error rates, and emits breaker events for monitoring.

## Use cases
- prevent cascading failures from slow remote calls
- trip a breaker after N failed HTTP requests
- add timeouts to remote calls that count as failures
- trip based on consecutive failures
- trip based on error rate over a sample window
- monitor breaker state changes via events

## When to choose
- you make remote calls in Go and want fail-fast behavior
- you need threshold, consecutive, or rate-based breaker strategies
- you want breaker events for metrics and alerting

## When to avoid
- you need retries, backoff, and load balancing in one package
- you're not using Go
- you need a full service mesh or proxy-level resilience solution

## Facets
- artifact type: library
- maturity: stable
- function: middleware, error-handling, concurrency
- domain: developer-tools, microservices, backend
- platform: go
- tags: circuit-breaker, fault-tolerance, resilience, remote-calls, rate-breaker

## Member repositories
- rubyist/circuitbreaker (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:49.953280+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:31:31.108723+00:00, confidence not recorded.
  - readme: https://github.com/rubyist/circuitbreaker (fetched 2026-08-28T04:03:49.953280+00:00, sha 42470b9bacaa)
- Data as of 2026-08-30T08:39:29.467469+00:00.
