The open source vector database: free, self-hosted, Apache 2.0

Milvus is a free, Apache 2.0 open source vector database from the LF AI & Data Foundation, written in Go and C++ for high-performance search at scale. Start with pip install, grow to tens of billions of vectors on Kubernetes, and keep the same API.

  • Apache License 2.0
  • 40K+ GitHub stars
  • LF AI & Data graduated project
  • Scales to tens of billions of vectors
  • 9,575 QPS on VectorDBBench (Cohere 1M)
One open source engine and one client API across every deployment mode.
One open source engine and one client API across every deployment mode.
Milvus and Zilliz Cloud adopters
  • NVIDIA
  • Salesforce
  • Walmart
  • eBay
  • IBM
  • Cisco
  • Reddit
  • Roblox
  • Shell
  • LINE
  • Bosch
  • Airtable

Why Milvus as an open source vector database for RAG and AI agents

Open source, for real

Apache 2.0 and governed by the LF AI & Data Foundation. Hundreds of contributors build it in the open on GitHub.

Fast on every CPU

The Knowhere engine picks SSE, AVX2, AVX512 or ARM instructions at runtime, and GPU indexes such as CAGRA run on NVIDIA hardware.

Scales out, not up

Storage and compute are separated. Stateless query, streaming and data nodes scale independently on Kubernetes to tens of billions of vectors.

Trusted in production

NVIDIA, Salesforce, Walmart, eBay, IBM and Reddit are on the Milvus adopter wall; Meituan runs 10B+ vectors on self-hosted Milvus.

Vector search throughput (QPS, higher is better)Cohere 1M, 768 dimensions
  • Zilliz CloudZillizCloud-8cu-perf13,316.23 QPSP99 2 ms · recall 0.9383
  • MilvusMilvus-16c64g-sq4u-fp16-force_merge9,575.69 QPSP99 2.3 ms · recall 0.9189

VectorDBBench leaderboard (zilliz.com/vdbbench-leaderboard), labels as published. Results depend on configuration; run VectorDBBench on your own data.

Zilliz Cloud is fully managed Milvus: the same API, with no clusters to size, upgrade or scale.

Try Zilliz Cloud free

Core capabilities

An open ecosystem, not a walled garden

Official SDKs and a REST API cover the common stacks and AI frameworks.

  • SDKs for Python, Java, Go and Node.js, plus a RESTful API
  • Integrations with LangChain, LlamaIndex, OpenAI, Hugging Face, Spark and Kafka
  • Attu GUI, Prometheus/Grafana monitoring and Milvus CDC for operations

Every major index, one engine

Choose the index per collection for recall, latency and memory, and combine vector search with filters or full-text search.

  • HNSW, IVF, DiskANN, SCANN and RaBitQ quantization (IVF_RABITQ)
  • GPU indexes: GPU_CAGRA, GPU_IVF_FLAT, GPU_IVF_PQ
  • BM25 full-text search and sparse vectors for hybrid search

Deploy a self-hosted vector database: pip, Docker, Kubernetes or managed

Same engine and API at every size, sized per the install overview. Distributed Milvus installs with the official Helm chart or Milvus Operator.

  • Milvus Lite: pip install, a local file, up to a few million vectors for notebooks and prototypes
  • Standalone: one Docker Compose file (milvus-standalone, etcd, MinIO), up to 100M vectors
  • Distributed on Kubernetes: 100M to tens of billions of vectors, tiered storage, 65,536 collections by default, partition keys for millions of tenants

How does Milvus compare with other open source vector databases?

Open source vector database comparison: Milvus vs Qdrant vs Weaviate vs Chroma vs pgvector, per each project's license file and docs
DatabaseLicense, languageSelf-hosted deploymentVector indexesHybrid search (keyword + vector)
MilvusApache-2.0; Go, C++pip (Lite), Docker (Standalone), Kubernetes (Distributed); Zilliz CloudHNSW, IVF, DiskANN, SCANN, IVF_RABITQ, GPU_CAGRABuilt-in BM25 and sparse vectors; RRF or weighted ranker
QdrantApache-2.0; RustDocker single node, cluster; Qdrant Cloud managedHNSWDense + sparse vectors fused with RRF or DBSF
WeaviateBSD-3-Clause core (separate Weaviate License for wl/); GoDocker, Kubernetes; Weaviate Cloud managedHNSW, flat, dynamic, HFreshVector + BM25F with relative score or ranked fusion
ChromaApache-2.0; Python, RustIn-process, client-server; Chroma Cloud managedHNSW (single node), SPANN (distributed)Vector search with full-text and metadata filters
pgvectorPostgreSQL License; CExtension in any Postgres, including managed PostgresHNSW, IVFFlatPostgres full-text search combined in SQL, e.g. with RRF

Facts from each project's documentation. Results depend on configuration; run VectorDBBench on your own data.

Local vector database in Python: pip install to first search

Milvus Lite ships with pymilvus. No server, no Docker, no account: the database is a local file.

python
# pip install -U "pymilvus[milvus-lite]"
import random
from pymilvus import MilvusClient

client = MilvusClient("milvus_demo.db")  # Milvus Lite: data lives in this local file
client.create_collection(collection_name="demo", dimension=768)

docs = ["Milvus is an open-source vector database.", "It runs on a laptop or on Kubernetes."]
vecs = [[random.random() for _ in range(768)] for _ in docs]  # swap in your embedding model
client.insert(collection_name="demo",
              data=[{"id": i, "vector": v, "text": t} for i, (v, t) in enumerate(zip(vecs, docs))])

print(client.search(collection_name="demo", data=[vecs[0]], limit=2, output_fields=["text"]))

To move to a server, pass its URI (for example http://localhost:19530) to MilvusClient.

Frequently asked questions

Are open source vector databases free for commercial use?

Milvus is: Apache 2.0 permits commercial use, modification and redistribution at no cost, and released code stays Apache 2.0. Milvus is a graduated LF AI & Data Foundation project; Zilliz is its major contributor. You pay only for the infrastructure you run.

What is the best open source vector database for RAG?

Pick by workload. Milvus fits RAG that needs hybrid search, filtering and scale: built-in BM25, partition keys for per-tenant retrieval, and LangChain and LlamaIndex integrations, from a laptop file to a Kubernetes cluster.

Open source vs managed vector database: which should you choose?

Self-hosting Milvus gives full control of data and infrastructure cost; your team runs upgrades, scaling and backups. Zilliz Cloud runs the same engine behind the same MilvusClient API, so moving either way needs no rewrite.

How much RAM does a self-hosted vector database need?

Raw float32 vectors take dimensions × 4 bytes each before index overhead. Milvus cuts that with SQ8 (75% less than FP32), IVF_RABITQ (1-to-32 compression) or DiskANN on NVMe; estimate with milvus.io/tools/sizing.

Is a self-hosted, on-premise vector database production-ready at scale?

Yes. Distributed Milvus runs on Kubernetes with replicas and independent scaling. Meituan runs 10B+ vectors on self-hosted Milvus; Read AI serves 20–50 ms retrieval to millions of users.

Run an open source vector database in five minutes

pip install pymilvus, open a local file, and search. Move to Standalone or Kubernetes as data grows, or hand operations to Zilliz Cloud, with no rewrite.

Sources and technical documentation (37)