Redis 8.8: New array data structure, rate limiter, performance improvements

150 points - last Wednesday at 10:05 AM

Source

Comments

simonw today at 2:53 PM
> 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.

9dev today at 12:06 PM
While I love Redis as a versatile tool for external data structures, it's still lacking in two areas IMHO:

One, it would be cool to be able to embed it, similar to sqlite, directly into applications.

Two, the HA story is so much more complicated than it should be. I totally acknowledge that concurrency and distributed computing is hard, but it should not require reading heaps of documentation and understanding two entirely separate multi-node approaches only to figure out there are lots of subtle strings attached that make it impractical for many applications.

tapoxi today at 12:21 PM
Where did everyone end up on the Redis/Valkey split? Is there still a reason to use Redis after the license kerfuffle?
epolanski today at 12:05 PM
There's also a separate blog post that goes into the details of why existing data structures Redis already supported, which could provide array-like behavior, weren't good enough:

https://redis.io/blog/diving-deep-into-rediss-new-array-data...

focusgroup0 today at 1:12 PM
given his ds4 project, likely collaborated with DeepSeek for this release:

https://github.com/antirez/ds4

caraphon today at 2:27 PM
window counter rate limiter!

This is awesome!

And arrays look great too. Lots to play with.

deleted today at 3:02 PM
Xotic007 today at 3:03 PM
[dead]
fga_qwrh today at 2:58 PM
And here we see the reason for the sudden AI enthusiasm of Redis authors: array data structures are used in AI. This was clear weeks ago.

The website looks like openclaw's website.