# juju/ratelimit

Efficient token-bucket-based rate limiter package.

Repository: https://github.com/juju/ratelimit
Canonical: https://ross.abutalabs.com/products/juju-ratelimit
Language: Go
License: NOASSERTION
License Family: other
Last push: 2023-10-05T04:11:43+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4563, "days_push": 1063, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2884, forks 315 (observed 2026-08-28T04:07:28.123278+00:00)

## What it is
A Go library implementing an efficient, concurrency-safe token-bucket rate limiter. It supports blocking and non-blocking token consumption plus rate-limited io.Reader and io.Writer wrappers.

## Use cases
- rate limit API requests in Go
- throttle bandwidth of a reader or writer
- implement token bucket pacing
- limit how fast a program consumes resources
- cap request rates per client
- smooth out bursty traffic

## When to choose
- you need a small, dependency-free token bucket in Go
- you want to rate-limit byte streams via io.Reader/io.Writer
- you need both blocking and non-blocking take semantics

## When to avoid
- you need distributed rate limiting across multiple instances
- you need per-key or sliding-window policies rather than a single bucket
- you are not using Go

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

## Member repositories
- juju/ratelimit (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:28.123278+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:48:19.098737+00:00, confidence not recorded.
  - readme: https://github.com/juju/ratelimit (fetched 2026-08-28T04:07:28.123278+00:00, sha 0276b9f03adc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
