sony/gobreaker

Circuit Breaker implemented in Go

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 1 hour ago
Added to GitGenius on September 18th, 2026
Created on May 29th, 2015
Open Issues & Pull Requests: 25 (+0)
GitHub issues: Enabled
Number of forks: 225
Total Stargazers: 3,696 (+0)
Total Subscribers: 38 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 15.9 days
Mean response time: 93.8 days
90th percentile: 298.2 days
Tracked items: 20

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 9
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,002 days
Stale 30+ days: 9
Stale 90+ days: 8

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

gobreaker is a circuit breaker implementation in Go that prevents requests from being sent when they are likely to fail.

The tool addresses the problem of cascading failures in distributed systems by implementing the circuit breaker pattern as a state machine. It wraps function calls and monitors their success or failure, transitioning between closed, open, and half-open states. When failures exceed a threshold, the circuit breaker opens to reject requests immediately rather than allowing them to fail. After a timeout period, it enters a half-open state to test whether the underlying service has recovered before resuming normal operation.

Developers building microservices or systems that call external services should consider this tool when they need resilience against transient failures. The implementation is particularly suited for Go applications where you want to prevent cascading failures without external dependencies. The tool offers fine-grained configuration through its Settings struct, allowing you to customize the failure threshold via the ReadyToTrip callback, define state transition behavior with OnStateChange, and distinguish between errors that should affect the circuit breaker state and those that should be ignored through the IsExcluded callback. It supports both fixed and rolling window strategies for tracking request counts, with the rolling window approach providing more granular failure detection over time.

The project maintains a steady stream of commits addressing bug fixes and feature enhancements. Pull requests are regularly reviewed and merged, indicating active maintenance. Issues are addressed with responsive feedback from maintainers. The codebase receives updates that refine the circuit breaker logic and expand configuration options based on user needs.