HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
brandur
redis-cell
C2016–2026
brandur / redis-cell

redis-cell

A Redis module that provides rate limiting in Redis as a single command.

10Distinct people
11Mentions
0Explicit recommenders
1.3KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A Redis module that provides rate limiting in Redis as a single command.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year11 dated mentions

Observed mentions: 2016-11-17 18:00:57 UTC to 2026-06-05 14:53:23 UTC.

01232016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC312
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC202
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC211
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC000
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC101

What Hacker News says

11 sources
> Rate limiting is one of the most common Redis use cases. Traditionally, users implemented rate limiters using server-side Lua scripts combined with client logic. In Redis 8.8, we introduce a window counter rate limiter (by @raffertyyu, together with the Redis team). I had a look for this and it turns out it's slightly mis-described there - it's not a window counter, it's a "GCRA (Generic Cell Rate Algorithm)" - a leaky bucket algorithm. Code here: https://github.com/redis/redis/blob/unstable/src/gcra.c The code comments say it was heavily influenced by https://github.com/brandur/redis-cell by Brandur Leach. It's a neat algorithm (I just learned about it today) - it only needs to store a single integer for each rate-limited key, which is the "Theoretical Arrival Time" when the bucket would next be empty.
In Redis 8.8: New array data structure, rate limiter, performance improvements
For my site, I use Redis in addition to PostgreSQL for these purposes: - User session storage - Asynchronous "queues" for background processing using Streams (was able to eliminate RabbitMQ from my stack when I switched to this) - Rate-limiting with a GCRA (via https://github.com/brandur/redis-cell) - Bloom filter checks, specifically for making sure people aren't using passwords in data breaches (via https://github.com/RedisBloom/RedisBloom with data from https://haveibeenpwned.com/passwords)
In Redis 6.0 GA
Personally, modules have been the thing I wanted most in redis for years, and it's been a delightful experience working on modules for the past months. I really think it's a game changer for redis and I can't wait to see where this will take it in the coming years. Some modules that are already out there (full disclosure - I work at Redis Labs and I've developed a couple of those): * redis-cell - a rate limiter module https://github.com/brandur/redis-cell * Redis Graph - a graph DB with a subset of Cipher for querying. https://github.com/swilly22/redis-module-graph * RediSeach - fast full-text search engine with fuzzy auto-suggest. https://github.com/RedisLabsModules/RediSearch * redis-ml: Machine learning models as redis data types. https://github.com/RedisLabsModules/redis-ml * redablooms - scalable bloom filters https://github.com/Redi
Read the rest
sLabsModules/redablooms * Secondary indexes with a small subset of SQL for WHERE clauses. https://github.com/RedisLabsModules/secondary * Time Series https://github.com/saginoam/RedisModuleTimeSeries PS If you're interested in creating modules, we've started a community for module developers. https://groups.google.com/forum/#!forum/redis-module-devs
In Redis 4.0 RC1 is out
Author here: this was a pretty fun side project to experiment with Redis' (relatively) new module system [1], and to help me learn Rust. It uses Rust's FFI module [2] to call into a C binary, and thanks to Rust's minimal runtime and lack of a GC, this turns out to work out very well. Its benchmarks are quite good [3]. Redis provides a fairly novel API for plugging into it in that instead of using a shared object (.so), it's only exposed as a C header file. To compensate for this in a non-C language, I have a build step that compiles a library for Rust to link against [4]. It was a pleasant surprise to find that this functionality is built right into Rust's compiler. [1] https://github.com/antirez/redis/blob/unstable/src/modules/I... [2] https://doc.rust-lang.org/book/ffi.html [3] https://gist.github.com/brandur/90698498bd543598d00df46e32b
Read the rest
In Show HN: Redis-cell, an API rate limiter as a Redis module, written in Rust

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.