Back to browse
GitHub Repository

Self-tuning Circuit Breaker and Concurrency Limiter

7 starsGo

Levee – a self-tuning circuit breaker and concurrency limiter for Go

by code_martial·Jul 12, 2026·3 points·0 comments

AI Analysis

●●SolidBig BrainNiche Gem

Beats static limiters in mesh sims with just 304 bytes of memory overhead.

Strengths
  • Fixed 304-byte memory footprint makes it viable for extreme low-latency paths.
  • Self-tuning logic removes the guesswork of manually configuring Hystrix-style thresholds.
  • Zero external dependencies ensures easy integration without bloating the binary.
Weaknesses
  • Go-only scope limits reach compared to language-agnostic sidecar proxies like Envoy.
  • Lacks the visual dashboarding and centralized control plane of full service meshes.
Target Audience

Backend engineers building high-throughput Go microservices

Similar To

Hystrix · Envoy · Resilience4j

Post Description

Rate limiters and circuit breakers work wonderfully well when they’re configured for the load and available capacity. But load, capacity, and latency drift over time, and keeping those settings current requires continuous effort. So I built Levee to be a hands-off, adaptive, easy to configure traffic governor.

Levee is configured with a success-rate target and timeout. It then continuously monitors the workload performance characteristics to detect downstream capacity exhaustion or failures. It can also spot a surge from growing concurrency before failures arrive. It runs in-process, uses a small, fixed amount of memory, has zero dependencies, and processes millions of requests per second.

In a deterministic 10-node mesh simulation, Levee outscored carefully tuned static rate limiters/breakers deployed throughout the mesh, while recording fewer failures and no node crashes.

Similar Projects

Developer Tools●●Solid

Preventing runaway LLM agents (enforcement layer)

VERONICA puts an enforcement shim between your agent and the model so you can halt costly spirals before a request hits the provider — it natively exposes hard budget enforcement, circuit breakers, retry containment and degradation levels. The README + runnable runaway-loop demo make the failure mode concrete and the API (BudgetEnforcer, RuntimeContext, BudgetExceeded) is small and practical. I'd like to see richer observability/adapter docs for common agent frameworks, but as an enforcement-first primitive this is a clever, useful tool.

Niche GemBig Brain
amabito
124mo ago