DistX
A simple, fast, in-memory vector database written in Rust. Designed with Redis-style simplicity and Qdrant API compatibility.
DistX combines the best of both worlds: Redis's simple architecture and performance with Qdrant's easy-to-use API. It's faster than Redis (26x faster inserts, 1.35x faster searches) while maintaining the same in-memory, fork-based persistence model. The Qdrant-compatible REST API makes it a drop-in replacement for existing applications.
What is DistX?
DistX is an in-memory vector database that provides fast similarity search using HNSW indexing. It offers a simple API compatible with Qdrant, making it easy to migrate existing applications.
Features
- Fast Vector Search: HNSW index for approximate nearest neighbor search
- Text Search: BM25 full-text search with ranking
- Payload Filtering: Filter results by JSON metadata
- Graph Support: Basic nodes and edges
- Dual API: REST (Qdrant-compatible) and gRPC APIs
- Persistence: Redis-style snapshots, WAL, and LMDB storage
- In-Memory First: Optimized for speed with optional persistence
Getting Started
Prerequisites
- Rust: Install from rustup.rs
- LMDB (for persistence):
- Linux:
sudo apt-get install liblmdb-dev - macOS:
brew install lmdb
- Linux:
Build from Source
The binary will be at target/release/distx.
Run the Server
Start DistX with default settings:
Or with custom options:
The server will start and listen on:
- HTTP API:
http://localhost:6333 - gRPC API:
localhost:6334
Quick Example
1. Create a Collection
2. Insert Vectors
3. Search Vectors
4. Get a Point
5. Delete a Point
For more examples and detailed API documentation, see Quick Start Guide.
Configuration
Command line options:
)
)
)
)
Architecture
distx/
├── lib/
│ ├── core/ # Core data structures (Vector, Point, Collection, HNSW)
│ ├── storage/ # Persistence layer (WAL, snapshots, LMDB)
│ └── api/ # REST and gRPC APIs
└── src/
└── main.rs # Main entry point
Testing
# Run all tests
# Run integration tests
# Run benchmarks
Documentation
- Quick Start Guide - Get started quickly with examples
- Architecture - System design and components
- API Reference - REST and gRPC API documentation
- Performance - Benchmarks and optimization details
License
DistX is licensed under the GNU General Public License v3.0.