# sony/gobreaker

Circuit Breaker implemented in Go

Repository: https://github.com/sony/gobreaker
Canonical: https://ross.abutalabs.com/products/gobreaker
Language: Go
License: MIT
License Family: permissive
Topics: golang, circuit-breaker, microservice
Last push: 2026-02-07T09:21:38+00:00

## Health v2 (maintenance only)
Score: 62/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 66, release rhythm 35, longevity 100
- inputs: {"age_days": 4114, "days_push": 207, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3687, forks 225 (observed 2026-08-28T04:08:14.656221+00:00)

## What it is
gobreaker is a Go library implementing the Circuit Breaker pattern as a generic, configurable state machine. It prevents sending requests likely to fail by tracking failures and toggling between closed, open, and half-open states.

## Use cases
- prevent cascading failures when a downstream service is down
- wrap HTTP calls to flaky external APIs with a circuit breaker
- stop hammering a failing database with requests
- add resilience patterns to Go microservices
- monitor service health via circuit breaker state change callbacks
- apply rolling-window failure counting to trip circuits

## When to choose
- you write Go services that call unreliable network dependencies
- you need a small, focused, well-maintained circuit breaker library
- you want configurable trip conditions, exclusion rules, and state change hooks

## When to avoid
- you need full resilience suites with retries, timeouts, and bulkheads (use something like resilience4j-style tooling)
- your project is not in Go
- you need distributed circuit breaker state shared across instances

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

## Member repositories
- sony/gobreaker (main) score 62

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:14.656221+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-29T18:31:09.775553+00:00, confidence not recorded.
  - readme: https://github.com/sony/gobreaker (fetched 2026-08-28T04:08:14.656221+00:00, sha 7d8b1a9210f8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
