Skip to content

MoonΒΆ

The Redis-compatible in-memory data store, reimagined in Rust β€” 250+ commands, vector + full-text search, and cross-store ACID, at up to 2.2Γ— Redis throughput.

Get started View on GitHub

5.11M GET ops/sec

3.50M SET ops/sec

27–35% less memory

132/132 consistency tests

Moon is a Redis-compatible in-memory data store built from scratch in Rust. It implements 250+ commands with a thread-per-core shared-nothing architecture, achieving up to 1.7–2.2Γ— Redis throughput while using 27–35% less memory for real-world value sizes. Beyond Redis compatibility, Moon provides cross-store ACID transactions, HNSW vector + BM25 full-text search, a Cypher property graph, workspace partitioning, durable message queues, and bi-temporal MVCC.

Note

Production-grade architecture, pre-1.0 maturity. Single-node Moon (v0.2.0) is recommended for production caching, AI workloads, and Redis-compatible OLTP. Multi-node clustering and multi-shard master PSYNC are alpha β€” see the production contract for the honest GA matrix. Wire protocol and on-disk format are LTS as of v0.2; CLI flags may still evolve until v1.0.

HighlightsΒΆ

  • 250+ commands


    Strings, hashes, lists, sets, sorted sets, streams, geo, HyperLogLog, pub/sub, transactions, Lua scripting, vector search, and graph.

    Command reference

  • Thread-per-core


    Shared-nothing design with per-shard event loops, DashTable SIMD probing, and lock-free channels.

    Architecture

  • Dual runtime


    Monoio (io_uring on Linux, kqueue on macOS) for peak performance. Tokio for portability.

    Runtimes

  • Per-shard persistence


    Forkless RDB snapshots and per-shard WAL with no global lock. AOF advantage grows with pipeline depth.

    Persistence

  • Cross-store transactions


    TXN.BEGIN/COMMIT/ABORT for atomic writes across KV, vector, and graph stores with undo-log rollback.

    Transactions

  • Full-text + vector search


    BM25 inverted index, HNSW + TurboQuant vectors, three-way hybrid fusion, and FT.AGGREGATE.

    Search guide

  • Workspaces & queues


    Multi-tenant namespace isolation (WS) and durable at-least-once queues with dead-letter and triggers (MQ).

    Workspaces

  • Drop-in compatible


    Works with any Redis client β€” connect with redis-cli, Jedis, ioredis, or redis-py out of the box.

    Quick start

Feature overviewΒΆ

Everything Moon ships today, grouped by area. 252 commands (per the COMMAND_META registry) across 25 groups β€” the full list lives in the command reference.

Core data store (Redis-compatible)ΒΆ

Feature What it does Docs
Data structures Strings, Hashes, Lists, Sets, Sorted Sets, and Streams β€” 100+ operations with RESP2/RESP3 semantics. Commands
Geospatial GEOADD, GEOSEARCH, GEORADIUS, GEODIST, GEOHASH, and more (8 ops). Commands
HyperLogLog Probabilistic cardinality β€” PFADD, PFCOUNT, PFMERGE (3 ops). Commands
Keyspace & TTL Expiry, SCAN, TYPE, key management, and keyspace notifications (15 ops). Commands
Pub/Sub Channel and pattern-based messaging (5 ops). Commands
Transactions MULTI/EXEC/DISCARD/WATCH optimistic locking (5 ops). Transactions
Lua scripting Sandboxed EVAL/EVALSHA with lazy sandbox init (5 ops). Commands
Connection & ACL AUTH, HELLO, RESP2/3 negotiation, and 8 ACL commands. Security
Drop-in protocol Works with redis-cli, Jedis, ioredis, redis-py, and any RESP client. Redis compatibility

Search & AIΒΆ

Feature What it does Docs
Vector search Native HNSW + TurboQuant (4-bit) index β€” COSINE/L2/IP, EF_RUNTIME tuning, up to 8.5Γ— less memory/vector (11 FT.* ops). Vector search
Full-text search BM25 inverted index over TEXT/TAG/NUMERIC fields with typo tolerance. Full-text search
Hybrid fusion Three-way BM25 + dense + sparse retrieval fused via Reciprocal Rank Fusion (RRF). Full-text search
Aggregations FT.AGGREGATE pipelines β€” GROUPBY, REDUCE, SORTBY, FILTER, LIMIT. Full-text search
Property graph Cypher subset with vector-guided traversal β€” GRAPH.* (14 ops). Commands
Semantic cache FT.CACHESEARCH single-RTT cache-or-search for LLM responses. SDK
Memory engine Converged KV + vector + graph + ACID as a substrate for AI agent memory. Memory engine
Python SDK moondb typed client with LangChain and LlamaIndex vector-store adapters. SDK

Durability & recoveryΒΆ

Feature What it does Docs
Per-shard WAL/AOF Lock-free per-shard append log β€” advantage grows with pipeline depth. Persistence
RDB snapshots Forkless point-in-time snapshots with no global stall. Persistence
Point-in-time recovery Replay the WAL to any timestamp (PITR). PITR
Change data capture Per-shard WAL streamed as Debezium-compatible JSON envelopes. CDC
Cross-store ACID TXN.BEGIN/COMMIT/ABORT atomic writes across KV, vector, and graph with undo-log rollback. Transactions

Multi-tenancy & messagingΒΆ

Feature What it does Docs
Workspaces Multi-tenant namespace isolation with per-workspace auth β€” WS (5 ops). Workspaces
Message queues Durable at-least-once queues with dead-letter and debounced triggers β€” MQ (7 ops). Message queues
Temporal queries Bi-temporal MVCC with AS_OF / VALID_AT time-travel across KV and graph. Temporal

Performance & architectureΒΆ

Feature What it does Docs
Thread-per-core Shared-nothing design with per-shard event loops and SO_REUSEPORT. Architecture
Dual runtime Monoio (io_uring on Linux, kqueue on macOS) for peak throughput; Tokio for portability. Architecture
Compact SSO types Inline keys (≀23 B) and values (≀12 B) β€” 27–35% less memory on real-world sizes. Architecture
Lock-free hot path DashTable SIMD probing and flume channels β€” no global locks on writes. Architecture

Operations & deploymentΒΆ

Feature What it does Docs
Replication PSYNC-based primary/replica streaming (5 ops). Multi-shard master PSYNC is alpha. Production contract
Clustering Gossip + slot routing β€” CLUSTER (9 ops). Alpha; single-node is the recommended production target. Clustering
TLS Encrypted client connections with cert rotation runbook. TLS
Docker Container images for local and production deployment. Docker
Monitoring INFO sections, slowlog, and metrics for observability. Monitoring
Security ACL rules, Lua sandbox isolation, and a published threat model. Security

Key metricsΒΆ

Headline numbers vs Redis 8.6.1 on GCloud c3-standard-8 (x86_64), peak throughput. Full report: see benchmarks.

Metric Result Conditions
Peak GET throughput 5.11M ops/sec GCloud x86_64, p=64 (1.72Γ— Redis)
Peak SET throughput 3.50M ops/sec GCloud x86_64, p=64 (1.92Γ— Redis)
Peak GET (ARM64) 3.47M ops/sec GCloud Neoverse-N1, p=64 (2.20Γ— Redis)
Memory (1KB+ values) 27-35% less per-key RSS measurement
Vector search (384d) 12.7K QPS HNSW + TurboQuant, COSINE
Data correctness 132/132 tests all types, 1/4/12 shards

Quick startΒΆ

git clone https://github.com/pilotspace/moon.git
cd moon
cargo build --release
./target/release/moon --port 6379 --shards 4
redis-cli -p 6379
127.0.0.1:6379> SET hello world
OK
127.0.0.1:6379> GET hello
"world"

Full quick start guide