VectraDB
An in-memory vector database written in Go, using arena-based memory allocation to avoid garbage-collection overhead and HNSW indexing for fast approximate nearest-neighbor search, with an optional distributed consensus mode.
VectraDB is a lightweight, in-memory vector database written in Go for AI infrastructure and high-throughput embedding workloads. It uses a custom memory arena holding raw float32 vector data to reduce garbage-collection pauses and improve CPU cache locality, and implements an inverted file index for approximate nearest-neighbor search.
An HNSW graph index is layered on top to further reduce search complexity, and a specialized zero-allocation min-heap tracks top-K results. Reads are sharded and lock-free for concurrent scaling across CPU cores, and the database snapshots to disk using Gob serialization for crash recovery. A separate branch adds a distributed mode built on multi-Raft consensus, providing leader election, log replication and fault tolerance at the cost of write throughput.
It ships as a small multi-stage Docker image and is written in Go.