Skip to main content

Architecture

VortexDB is a high-performance vector database built in Rust, designed with modularity and flexibility at its core.

Crate Structure

VortexDB is organized as a Rust workspace with the following crates:

Transport Layers

VortexDB exposes two APIs that share the same underlying database:

gRPC API

The gRPC layer is the primary high-performance interface:
  • Protocol: HTTP/2 with Protocol Buffers
  • Port: 50051 (default)
  • Authentication: API key via authorization header
  • Use cases: Production workloads, SDKs, high-throughput scenarios

HTTP API

The HTTP layer provides a RESTful interface:
  • Protocol: HTTP/1.1 with JSON
  • Port: 3000 (default)
  • Authentication: None (designed for internal/trusted networks)
  • Use cases: Quick testing, curl commands, prototyping

When to Use Which?

  • Building production applications
  • Using the Python SDK (it uses gRPC)
  • Need authentication
  • Processing high volumes of requests
  • Want strongly-typed client libraries

Storage Layer

The storage layer persists vectors and their payloads using a trait-based design:

Available Backends

Set the backend via the STORAGE_TYPE environment variable:

Index Layer

The index layer provides fast similarity search. See Indexers for details on choosing the right index.

Data Flow

Here’s what happens when you insert a vector:
1

Client Request

Client sends insert request via gRPC or HTTP
2

Validation

Server validates vector dimensions match configuration
3

Storage Write

Vector and payload are persisted to the storage backend
4

Index Update

Vector is added to the index for fast searching
5

Response

Server returns the generated point ID to client

Configuration

VortexDB is configured via environment variables:

Thread Safety

VortexDB is designed for concurrent access:
  • The storage layer uses Arc for thread-safe reference counting
  • The index layer uses RwLock for concurrent reads with exclusive writes
  • Both gRPC and HTTP handlers are fully async using Tokio

Next Steps

Indexers

Learn about index algorithms and when to use each

Snapshots

Understand backup and restore mechanisms