←back to thread

143 points barddoo | 1 comments | | HN request time: 0.356s | source

Writing Redis from scratch in Zig.
Show context
k_bx ◴[] No.45310497[source]
Sorry if somewhat off-topic, but might help with getting more users. Redis is actually good enough and easy to install for most projects, but it has downside that it's "memory-only" (needs to fit in ram), and if you're in a tight container/vm – you'd better not rely on it solely.

So, there's another project – called kvrocks https://github.com/apache/kvrocks , which is for people which don't need in-memory perf of redis but would like to use its protocol and be still very performant. However, its devs never packaged a release in deb and other formats.

So, if you were to implement something similar ^ which will implement the protocol, have ability to grow on disk, and be available in distro repos (ideally) – would definitely hold a niche of many little projects which benefit from redis-like thing I've done.

replies(5): >>45310703 #>>45311050 #>>45311944 #>>45312922 #>>45314866 #
Szpadel ◴[] No.45311050[source]
Redis is for high frequency cache, disk latencies would slow it too much. Maybe putting something that would normally be evicted to disk could be valid compromise.

another major drawbacks of Redis is that It is single threaded and sync. you need expensive high frequency CPU if you need more performance. something that could benefit from multi core system and if you would want to use disk cache async is a must. single threading also affects scripts running on Redis side, when they execute whole Redis is waiting and is unable to fulfil other requests.

another place for improvement would be proper easier to use HA, and maybe also auto scaling.

replies(2): >>45311124 #>>45311956 #
1. progbits ◴[] No.45311956[source]
The Redis HA story is horrendous. I wonder if Sentinel is intentionally just crap enough to get your application locked in but then force you to pay them for hosted option.

It regularly gets itself into messed up state and even with graceful shutdown for node updates the official client libraries throw errors for up to a minute.