Barrel Vector

High-performance single-node vector database built in Erlang. Fast, embeddable, production-ready.

Choose Your Backend

Four indexing backends, one API. Pick the right one for your workload.

DEFAULT

HNSW

Pure Erlang implementation. Best for most use cases.

  • + Fast search <5ms
  • + No dependencies
  • + Good recall
GPU

FAISS

Meta's library via NIF. Best for large scale + GPU.

  • + GPU acceleration
  • + Billion-scale
  • + IVF, PQ compression
DISK

DiskANN

Pure Erlang SSD-optimized index. Best for large datasets on disk.

  • + SSD-optimized
  • + Low memory footprint
  • + No dependencies
KEYWORD

BM25

Pure Erlang full-text search. Combine with vectors for hybrid.

  • + Full-text search
  • + Hybrid with RRF
  • + No dependencies

Hybrid Search

Combine vector + BM25 with RRF fusion for best results

Multiple Metrics

Cosine, Euclidean, Dot Product distance

Metadata Filtering

Filter vectors by arbitrary JSON metadata

Persistence

RocksDB-backed storage with crash recovery

HTTP API

Simple REST interface for all operations

Embeddable

Use as a library in Erlang/Elixir apps

Performance

<5ms

Search (p99, top-10)

10K/sec

Insert throughput

1K QPS

Search throughput

Benchmarked on 1M vectors, 1536 dimensions

Quick Start

cURL
# Run with Docker
docker run -p 8080:8080 barrel-platform/barrel-vectordb

# Create a collection
curl -X POST http://localhost:8080/collections \
  -H "Content-Type: application/json" \
  -d '{"name": "documents", "dimension": 1536, "metric": "cosine"}'

# Insert vectors
curl -X POST http://localhost:8080/collections/documents/vectors \
  -H "Content-Type: application/json" \
  -d '{
    "vectors": [
      {"id": "doc1", "values": [0.1, 0.2, ...], "metadata": {"title": "Hello"}}
    ]
  }'

# Search
curl -X POST http://localhost:8080/collections/documents/search \
  -H "Content-Type: application/json" \
  -d '{"vector": [0.15, 0.25, ...], "top_k": 10}'

When to Use

Use Barrel Vector when:

  • + Single machine deployment
  • + <10M vectors
  • + Simple setup preferred
  • + Embedded in Erlang/Elixir app

Consider alternatives when:

  • + Need distributed cluster
  • + >10M vectors
  • + Automatic failover required
  • + Horizontal scaling needed