# uber-go/ratelimit

A Go blocking leaky-bucket rate limit implementation

Repository: https://github.com/uber-go/ratelimit
Canonical: https://ross.abutalabs.com/products/ratelimit
Language: Go
License: MIT
License Family: permissive
Last push: 2024-05-01T03:43:25+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3645, "days_push": 854, "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 4713, forks 328 (observed 2026-08-28T04:08:57.402286+00:00)

## What it is
A Go library implementing a blocking leaky-bucket rate limiter. It refills the bucket based on elapsed time between requests, and Take() sleeps until the caller may proceed.

## Use cases
- throttle outgoing API requests to a fixed rate
- limit how fast a worker processes a queue
- pace database or service calls per second
- smooth bursty traffic in Go services
- add simple per-second rate limiting without complex token buckets

## When to choose
- you need a simple, low-overhead blocking rate limiter in Go
- you want Take()-and-sleep semantics rather than token acquisition
- you prefer minimal API over golang.org/x/time/rate's flexibility

## When to avoid
- you need burst capacity, reservations, or per-key limits (use golang.org/x/time/rate)
- you need non-blocking or context-cancellable waiting
- you're not writing Go

## Facets
- artifact type: library
- maturity: stable
- function: rate-limiting, concurrency
- domain: developer-tools, backend, performance
- platform: go, cross-platform
- tags: leaky-bucket, throttling, blocking-limiter

## Member repositories
- uber-go/ratelimit (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:57.402286+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:19:08.981787+00:00, confidence not recorded.
  - readme: https://github.com/uber-go/ratelimit (fetched 2026-08-28T04:08:57.402286+00:00, sha b6f2f9b938b5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
