KiviDB - Rust-built Redis-compatible database with vector search

Show HN: KiviDB, a faster Redis-compatible memory database and vector cache

KiviDB - Rust-built Redis-compatible database with vector search

KiviDB is a fast, multi-threaded alternative to Redis and Valkey written in Rust. It speaks the Redis protocol (RESP2 and RESP3), so existing clients and redis-cli work unchanged, while adding built-in full-text and vector search via Redis Stack-style FT.* commands. Running commands on every core through a sharded in-memory design, it hits 21 million pipelined GETs per second on 32 cores—about 9× Redis 8 and 2.3× Dragonfly—with under half Dragonfly's p99 latency. Optional Lua scripting and TLS, snapshots plus AOF persistence, and a Docker image listening on port 6380 make migration painless.

On the same 32 cores, KiviDB serves 21 million pipelined GETs per second: about 9× Redis 8 and 2.3× Dragonfly, with under half Dragonfly's p99 latency.
  1. Shamanoid

    Nice project but I am a bit curious about the 31x performance gain over Redis. Antirez has always been an optimisation guru for a lot of us and benching as high as 31x on simple pipeline SET seems absurd (in the good sense of the term here). I can see in the generated README that the start script is using NUMA settask to pin down the number of cores but running 46 redis instances under the pretence that Redis is mono-threaded is actually not reflecting a correct picture here. Yes the command execution loop is mono-threaded but Redis uses multi-threading on io for example. Therefore, the test would be biased as the thread pool would become completely starved. A simple way to look into this would be to dump the CPU wait ops in the benchmark as well to truly understand what's justifying the 31x performance gain.

  2. romange

    Kudos on the project launch! I can share my experience from when I was evaluating multi-threaded architectures for Dragonfly back in 2022.

    At the time, I had a choice: go down the KeyDB path and suffer from lock contention in real-world use cases, or go with a shared-nothing approach. The latter paid a somewhat heavy price for inter-thread communication, but when combined with a carefully chosen transactional framework could truly become a seamless Redis drop-in replacement. I chose the shared-nothing model.

    "Dragonfly removes locks and pays the cost of message passing; KiviDB keeps locks but makes them so fine-grained that they rarely collide and never need to move a request between threads."

    Reading this sentence, I immediately saw where it fits into the broader taxonomy of in-memory store architectures. KeyDB, Garnet, and KiviDB share the same foundation: employing fine-grained locks. The choice of programming language (Rust, C#, C++) is less important as it's the underlying architecture that dictates the trade-offs.

    With lock-based approaches, features like MULTI/EXEC, Lua scripts, and multi-key operations introduce severe contention that becomes hard to manage. Furthermore, background tasks such as snapshotting, full replication sync, and memory defragmentation are more difficult to implement efficiently when relying on low-level locks.

    On the other hand, I would definitely opt for a shared-everything architecture like KiviDB's if I were designing Memcached today - a min […]

  3. edoceo

    Could you add Valkey to the benchmark? Curious about different key-types too, like list and hash. Also, big values (2KB) and small values (<256B)

  4. yawniek

    Congrats, very cool Project!

    And impressive benchmarks.will have to try it.

    Shameless plug:

    Did something similar but with on disk storage as an experiment ( https://github.com/yannick/marekvs ). Mostly geared towards testing interesting datastructures.

  5. murtazayusuf

    Just adding my benchmarking repo, that contains terraform code and scripts using which I performed the benchmarks, helpful for re-evaluating and verifying the numbers published on our website. And possibly to learn where we might have gone wrong.

    https://github.com/kividbio/kivi-benchmark

More from this day

2026-10-19