Back to browse
GitHub Repository

Control the heat. A concurrency limiter with built-in priority queue, circuit breaker, adaptive backoff, and windowed metrics.

0 starsTypeScript

Regulo – an adaptive semaphore for saturation control

by bnjemian·Jun 26, 2026·2 points·0 comments

AI Analysis

●●SolidBig BrainSolve My Problem

Circuit breaker trips on saturation timeouts, not errors — different from every other limiter.

Strengths
  • Saturation-based circuit breaker is genuinely novel — trips on backup, not operation errors
  • Built-in 1m/5m/15m/1h/24h windowed metrics via status() with zero extra dependencies
  • Zero dependencies, 6.6KB min+gzip, tree-shakeable ESM — minimal supply-chain surface
Weaknesses
  • Concurrency limiting is a crowded category with p-limit, bottleneck, and semaphore-async-await
  • No mention of distributed coordination — only works for single-process scenarios
Target Audience

Backend developers managing SSR rendering, database pools, or downstream API rate limiting

Similar To

p-limit · bottleneck · opossum

Post Description

Built this semaphore while working on our bootstrapped community dating platform (june.dating) after a traffic spike hit our SSR rendering path.

It's a priority-queue semaphore with weighted permits, a saturation circuit breaker (trips on timeouts, not errors), and adaptive backoff. It has some baked in observability with status(), which gives you queue depth, latency, and circuit state for free. Zero dependencies, ~26KB minified, TypeScript, ESM+CJS.

Written by a human, optimized by the bots.

Similar Projects