# go-redis/redis_rate

Rate limiting for go-redis

Repository: https://github.com/go-redis/redis_rate
Canonical: https://ross.abutalabs.com/products/redis_rate
Homepage: https://redis.uptrace.dev/guide/go-redis-rate-limiting.html
Language: Go
License: BSD-2-Clause
License Family: permissive
Topics: redis, gcra, rate-limiting, leaky-bucket
Last push: 2026-08-26T05:30:14+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 3914, "days_push": 7, "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 1039, forks 108 (observed 2026-08-28T04:03:19.812846+00:00)

## What it is
A Go library implementing GCRA (leaky bucket) rate limiting on top of Redis, built for the go-redis client. It exposes a simple Allow API with per-second/minute limits and retry-after info, usable in HTTP middleware.

## Use cases
- rate limit API requests per user or project
- implement leaky bucket throttling with Redis
- add rate limiting middleware to a Go HTTP server
- limit how often a job or webhook can run
- return RateLimit-Remaining and Retry-After headers

## When to choose
- you already use go-redis and need distributed rate limiting
- you want GCRA/leaky-bucket semantics without extra dependencies
- you need per-key limits with remaining quota and retry-after values

## When to avoid
- you don't use Redis or want an in-process limiter
- you need token bucket with burst controls rather than GCRA
- your Redis is older than version 3.2

## Facets
- artifact type: library
- maturity: active
- function: rate-limiting, caching
- domain: databases, backend, web-development, developer-tools
- platform: go, cross-platform
- tags: gcra, leaky-bucket, go-redis, redis-lua, api-rate-limiting, redis

## Member repositories
- go-redis/redis_rate (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:19.812846+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-30T07:03:36.728284+00:00, confidence not recorded.
  - readme: https://github.com/go-redis/redis_rate (fetched 2026-08-28T04:03:19.812846+00:00, sha c2f108481195)
  - homepage: https://redis.uptrace.dev/guide/go-redis-rate-limiting.html (fetched 2026-08-29T13:04:36.166556+00:00, sha 6516219c0994)
- Data as of 2026-08-30T08:39:29.467469+00:00.
