Show HN: Lux – Drop-in Redis replacement in Rust. 5.6x faster, ~1MB Docker image (github.com)

by mattyhogan 30 comments 59 points
Read article View on HN

30 comments

[−] kaoD 62d ago
Discussion in Rust's subreddit, with some fair criticism: https://old.reddit.com/r/rust/comments/1ruq7tk/lux_a_rust_re...

Some highlights that made me think:

> It's easy to say you're faster if you don't actually support everything or maybe even made a mistake.

> I don't see any tests so I wouldn't use this.

---

> the repo has 5 commits and the first one is from 3 hours ago. "I've been working on" is probably more accurately "this morning I asked an ai to write this for me".

---

> The single-threaded design of redis was specifically so that operations are ordered sequentially, so that the WAL-like log would be replayable and you'd get the exact same state as when shutting down the server.

> Did you take any measures to ensure a sequential order of executed commands?

[−] tmaly 61d ago
sounds like it was vibe coded?
[−] mattyhogan 62d ago
I built Lux because Redis is single-threaded and hasn't changed architecturally since 2009. Lux uses a sharded concurrent architecture in Rust with per-shard reader-writer locks, zero-copy RESP parsing, and pipeline batching. It speaks RESP natively so every Redis client works unchanged. We benchmarked against Redis 7, Valkey 9, and KeyDB with redis-benchmark (50 clients, 1M requests) - full results in the README. The Docker image is ~1MB on ARM. MIT licensed, no plans to change that. If you don't want to self-host, there's managed hosting at luxdb.dev. Happy to answer questions about the architecture or benchmarks.
[−] redfloatplane 62d ago
Just a minor thing - your readme claims “MIT licensed forever” but here you say there are “no plans to change that”. Those are different things!

Cool project.

[−] mattyhogan 62d ago
Good point! There's an issue RE license so this will be addressed tomorrow
[−] 0xMohan 62d ago
I'm not a DB expert but from what I know, theoretically multi-threading might not bring the performance boost you might expect as on real-world deployment higher contention & latency will kill your throughput as a result your performance would be bad because shared locks will be held longer.

So lock-free single threaded with event-loops DBs should in most cases (when implemented properly) outperform the multi-threaded DBs with shared locks in a high contention & latency environment.

But you claim Lux is more performant than Redis & Valkey, I have no idea on the internals of Lux or the benchmark environment to reject your claims. As more people try it in real workloads, we'll know the actual performance of Lux.

[−] mattyhogan 62d ago
Totally fair, a lot of people on reddit were questioning benchmarking. Should've included in the post

I used the official redis-benchmark tool run with Redis, Lux, Valkey, and a few others. Can be reproduced in a few minutes

[−] deminature 62d ago
Adding some tests that prove equivalent functionality to Redis would make people much more likely to adopt this. Very cool project otherwise.
[−] karunamurti 62d ago
Are the commands fully compatible with Redis? We use a lot of commands like TTL PTTL EXPIRE PEXPIRE to create various rate limiters.
[−] mattyhogan 62d ago
Yeah I'd say we're at 80% command coverage with plans to fill it out soon. But all the ones you mentioned are supported! Rate limiters using an INCR / EXPIRE pattern will work just fine
[−] gerdesj 62d ago
There are six source files. No comments that I could see on a casual glance. It looks to me as vibed with post processing prompts enforcing minimalism.

To be fair, this thing is a bare bones effort, ie v1 release to public. It looks like there is no config file and associated processing which might add a fair bit of code but that is probably an include and a stanza or two.

If this is redis pared to the bone then it might actually fly. I suppose I ought to look at the source for redis to compare.

[−] rvz 62d ago
Sometimes, the test suite is a moat in open source and can be used to show you are a true 1:1 replacement with 100% compatibility, or with the test suite being closed source to protect against competing rewrites, just like with SQLite.

So this isn’t a “drop-in Redis replacement”. It has no tests at all to verify 1:1 Redis functionality and of course it is fully AI generated.

Avoid.

[−] Bnjoroge 62d ago
yeah a repo with only about 18 or so commits and about 3 days of commit history is definitely not vibecoded
[−] _pdp_ 62d ago
Typically you wait OSS projects to mature before you add a cloud offering but I guess not in the age of AI.
[−] FergusArgyll 62d ago
What's the future of Show HN? What do I as a reader do? just never look at it again? wait until it's used by a million people? Do I have to read the code of every new project posted here? I guess get codex to read it?!?!
[−] japgolly 62d ago
[−] ares623 62d ago
Rivetting
[−] bysiber 62d ago
Curious about persistence - does this support RDB/AOF snapshots or is it purely in-memory? That's usually the first question that comes up when teams evaluate Redis alternatives.
[−] mholubowski 62d ago
Why isn’t this getting any love? What’s the catch?
[−] delduca 62d ago
I bet it does not support Lua scripting.
[−] delduca 62d ago
What is the difference between your project and the linux fundation fork?
[−] nathanjordan 61d ago
Dunning-Kruger on full display
[−] KnowFun 61d ago
[flagged]
[−] ArchieScrivener 62d ago
Very cool. Clean.