Show HN: KiviDB, a faster Redis-compatible memory database and vector cache
Introducing KiviDB: A High-Performance Redis-Compatible Memory Store & Vector Cache
KiviDB is a cutting-edge, multi-threaded alternative to Valkey and Redis®, engineered entirely in Rust. It is designed as a drop-in replacement that maintains full compatibility with the Redis protocol (both RESP2 and RESP3), ensuring that your existing libraries and redis-cli tools function without modification.
🚀 Core Architecture & Capabilities
Unlike traditional single-threaded models, KiviDB utilizes a sharded in-memory key-value architecture that leverages every available CPU core.
System Design
Key Technical Specifications
- Protocol Support: Full Redis-compatible command set (refer to
COMMANDS.md). - Search Integration: Built-in
FT.*commands (Redis Stack style) for:- Full-text search (utilizing BM25)
- Tag and Numeric filtering
- Vector Search (supporting both
FLATandHNSWindices)
- Extensibility:
- Lua Scripting: Available via the
--features luaflag (supportsEVAL,SCRIPT,FUNCTION,FCALL). - TLS Encryption: Available via the
--features tlsflag.
- Lua Scripting: Available via the
- Networking: Defaults to
0.0.0.0:6380with protected mode enabled. - Licensing: Distributed under the GNU Affero General Public License v3 (AGPL-3.0-only). Note: Using KiviDB does not automatically subject your own application to the AGPL.
⚡ Performance Benchmarks
KiviDB is engineered for extreme throughput. On a 32-core setup, it can handle pipelined GET operations per second. This represents a performance increase of roughly over Redis 8 and over Dragonfly.
Quick Start Deployment
To run KiviDB via Docker:
docker run -d -p 6380:6380 kividb/kividb
To test the connection:
redis-cli -p 6380 PING
# Expected Output: PONG
Note: KiviDB uses port 6380 by default to avoid conflicts with Redis (6379), allowing both to coexist on one host.
📊 Comparative Analysis
The following table compares KiviDB against other prominent memory stores as of October 2026.
| Feature | KiviDB | Redis 8 | Valkey 8 | Dragonfly | KeyDB |
|---|---|---|---|---|---|
| License | AGPL-3.0 | RSALv2/SSPLv1/AGPL | BSD-3-Clause | BSL 1.1 | BSD-3-Clause |
| Language | Rust | C | C | C++ | C++ |
| Threading | Every core (sharded) | Single (w/ I/O threads) | Single (w/ I/O threads) | Every core (shared-nothing) | Multi-threaded |
Search (FT.*) | Built-in | Built-in (Query Engine) | Separate Module | Built-in | No |
| Lua Support | Yes | Yes | Yes | Yes | Yes |
📈 Detailed Performance Metrics
1. Key-Value Store Throughput
Environment: AWS Graviton3 bare metal (c7gn.metal), 64 vCPUs (limited to 32), 10M keys, 100-byte values.
| Operation | KiviDB 1.1.0 | Dragonfly 2.0.2 | Redis 8.10 | Redis Cluster (32 shards) |
|---|---|---|---|---|
GET (Pipeline 16) | 21.2M ops/s | 9.1M ops/s | 2.4M ops/s | 4.7M ops/s |
SET (Pipeline 16) | 19.2M ops/s | 8.5M ops/s | 2.0M ops/s | 4.7M ops/s |
GET (No Pipeline) | 3.07M ops/s | 3.35M ops/s | 1.32M ops/s | 1.46M ops/s |
SET (No Pipeline) | 3.12M ops/s | 3.38M ops/s | 1.54M ops/s | 1.46M ops/s |
| p99 Latency (Pipe 16) | 0.36 / 0.42 ms | 0.88 / 1.07 ms | 2.2 / 2.7 ms | N/A |
| Memory per Key | 177 B | 134 B | 178 B | 183 B |
2. Vector Search Performance
Dataset: glove-25-angular (1.18M vectors, 25 dimensions). HNSW config: .
| Metric | KiviDB 1.1.0 | Dragonfly 2.0.2 | Redis 8.10 |
|---|---|---|---|
| Queries/s (ef 64) | 59.3k (0.943 recall) | 41.3k (0.912 recall) | 31.8k (0.912 recall) |
| Queries/s (ef 128) | 50.7k (0.961 recall) | 40.3k (0.937 recall) | 28.9k (0.937 recall) |
| Queries/s (ef 256) | 31.5k (0.989 recall) | 36.2k (0.979 recall) | 21.1k (0.979 recall) |
| Queries/s (ef 512) | 18.7k (0.998 recall) | 29.8k (0.995 recall) | 13.7k (0.995 recall) |
| Index Build Time | 31 s | 13 s | 38 s |
| Post-Ingest Memory | 1.66 GB | 1.13 GB | 1.07 GB |
Methodology Note: All tests were conducted using
kivi-benchmark. Results are a snapshot of a controlled environment andnot a guaranteeare not intended as a universal promise; users should validate performance on their own specific hardware.
🔍 Vector Search Implementation
KiviDB provides a seamless experience for those familiar with Redis Stack. You can perform Approximate Nearest Neighbor (ANN) searches using FLAT or HNSW on hash fields.
Example: Creating a Search Index
To initialize an index on keys with a specific prefix, including a vector field and optional metadata:
redis-cli -p 6380 FT.CREATE i ... (followed by field definitions).