OSS TanbouSign in with GitHub

stop sending requests to a failing dependency with open, half-open, and closed circuit states

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
3,702
Primary language
Go
License
MIT
Repository last updated
Feb 7, 2026
On this page

Overview

sony/gobreaker implements the Circuit Breaker pattern in Go. It counts request successes and failures, opens the circuit when a threshold is crossed, rejects calls while open, then probes recovery in half-open state after a timeout. The v2 API supports generic result types.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Define when failures move the circuit from closed to open

Consecutive failures or a custom ReadyToTrip function can open the breaker, preventing the application from continuing to call a dependency that is already failing.

Sources: [2]

Tune rolling windows, half-open probes, and excluded errors

Interval and BucketPeriod configure counting windows, MaxRequests controls half-open probes, and Timeout controls the open period. IsExcluded can keep context cancellations and similar errors out of breaker metrics.

Sources: [2]

Best fit

Fits microservices that need to limit failure propagation from APIs, databases, or RPC dependencies

Combined with timeouts and retries, it helps Go services fail fast during downstream incidents rather than amplifying load through repeated attempts.

Sources: [2]

Before adoption

the v2.4.0 v2 module declares Go 1.22/toolchain 1.22.10 and panics are rethrown after accounting

The v2/go.mod at v2.4.0 declares Go 1.22.0 with toolchain go1.22.10. If the wrapped request panics, Execute accounts for it as a failure and then re-panics. The breaker also does not enforce request timeouts itself, so context deadlines and retry budgets remain application responsibilities.

Sources: [3][2][4]

Official sources

  1. [1]sony/gobreaker — GitHub repository(2026-10-06)
  2. [2]gobreaker v2.4.0 — README(2026-10-06)
  3. [3]gobreaker v2.4.0 — v2/go.mod(2026-10-06)
  4. [4]gobreaker v2.4.0 tag(2026-10-06)
  5. [5]gobreaker MIT license(2026-10-06)
Supplemental curator note

gobreaker is a small resilience primitive for preventing repeated failures against HTTP services, databases, or other dependencies from being amplified by retries. Tune failure classification, open duration, and half-open probe counts to the dependency's SLO and retry policy.

Try it in 3 steps

  1. 1

    Get the source

    git clone --depth 1 https://github.com/sony/gobreaker.git
  2. 2

    Enter the repository

    cd gobreaker
  3. 3

    Check the official steps

    Continue with the commands in the README Installation, Quick Start, or Getting Started section.

    find . -maxdepth 1 -iname 'README*' -exec sed -n '1,220p' {} \; -quit
Check the official README

Growth

Growth trends · Last 30 days

3,702 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
0
Open PRs
18

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • golang
  • circuit-breaker
  • microservice
Stars
3,702
Forks
230
Watchers
38
Open issues
10
Contributors
17
Owner type
Organization
Primary language
Go
License
MIT
Repository last updated
Feb 7, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?