lux  by lux-db

High-performance, multi-threaded Redis-compatible data store

Created 2 months ago
257 stars

Top 98.3% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

Lux addresses the performance ceiling of Redis's single-threaded architecture by providing a Redis-compatible key-value store built with a multi-threaded, sharded Rust design. It targets users needing higher throughput and lower latency, offering up to 10x faster performance and linear scalability across multiple CPU cores, while integrating advanced features like native vector search and time series data.

How It Works

Lux employs a sharded concurrent architecture leveraging Rust and Tokio's async runtime. Each key maps to a shard protected by a parking_lot RwLock, enabling reads to proceed concurrently and writes to affect only a single shard. This design safely utilizes all available CPU cores within a single process, achieving linear throughput scaling unlike Redis's single-core limitation. Transactions (MULTI/EXEC) utilize optimistic concurrency via shard versioning, avoiding global locks.

Quick Start & Requirements

  • Installation: Build from source using cargo build --release or use the Docker image ghcr.io/lux-db/lux:latest.
  • Prerequisites: Rust toolchain for source builds.
  • Documentation: Architecture deep dive available at luxdb.dev/architecture.

Highlighted Details

  • Performance: Benchmarks show up to 10x higher throughput than Redis 8.4.2, particularly for pipelined commands and GEO searches, with linear scaling as cores are added.
  • Native Features: Integrates vector search (cosine similarity, HNSW), time series (aggregation, retention), realtime key subscriptions (KSUB), relational tables (typed fields, joins), and GEO commands directly, without requiring modules.
  • Client Compatibility: Fully compatible with existing Redis RESP2 clients, requiring zero code changes for most workloads.
  • Architecture: Utilizes a multi-threaded, sharded design with zero-copy parsing and pipeline batching for efficiency.

Maintenance & Community

The README does not detail specific community channels (e.g., Discord, Slack), notable contributors, or sponsorships.

Licensing & Compatibility

  • License: MIT.
  • Compatibility: Permissive MIT license allows for commercial use and integration into closed-source applications.

Limitations & Caveats

Lux omits AOF persistence in favor of snapshots and a 1-second-interval WAL, implying potential data loss up to that window. It supports only the RESP2 protocol and operates as a single-node system, with clustering managed via Lux Cloud. MULTI/EXEC transactions use optimistic locking, allowing other clients to observe intermediate states during execution, a difference from Redis's single-threaded isolation.

Health Check
Last Commit

20 hours ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
0
Star History
13 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Georgios Konstantopoulos Georgios Konstantopoulos(CTO, General Partner at Paradigm), and
3 more.

risingwave by risingwavelabs

0.2%
9k
Stream processing and serving for AI agents and real-time data applications
Created 4 years ago
Updated 15 hours ago
Starred by Clement Delangue Clement Delangue(Cofounder of Hugging Face), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
26 more.

datasets by huggingface

0.1%
22k
Access and process large AI datasets efficiently
Created 6 years ago
Updated 1 day ago
Starred by Mike Krieger Mike Krieger(CPO at Anthropic; Cofounder of Instagram), Patrick von Platen Patrick von Platen(Author of Hugging Face Diffusers; Research Engineer at Mistral), and
25 more.

redis by redis

0.1%
75k
Redis is a versatile data structure server, cache, and query engine
Created 17 years ago
Updated 1 day ago
Feedback? Help us improve.