自托管向量数据库2026:Qdrant vs Milvus vs Chroma怎么选
想让embedding留在自己硬件上——不按查询付费、数据不出门。自托管向量数据库就是答案。
Self-Hosted Vector Databases: The 2026 Landscape
Vector databases store embeddings and find nearest neighbors - the retrieval engine under every RAG app. Self-hosting means you own the data, pay fixed infrastructure cost, and avoid per-query pricing. Three open-source options dominate: Qdrant (33,706 GitHub stars, Rust, Apache-2.0), Milvus (45,450 stars, Go/C++, Apache-2.0), and Chroma (28,918 stars, Rust core, Apache-2.0).
The Quick Decision
Qdrant - the balanced default. Written in Rust, single binary, easy Docker deploy, excellent filtering (you can combine vector search with metadata filters like status=published). Its cloud-compatible API means you can start self-hosted and move to their cloud later without code changes.
Milvus - for scale. A distributed system with separate components (coordinator, data nodes, query nodes) designed for billions of vectors. Overkill for a single app; the right call when you have massive collections and high query rates. It also ships with a standalone mode for small deployments.
Chroma - the simplest. An embedded database (like SQLite for vectors) that runs inside your Python process. Perfect for prototypes, small apps, and desktop tools. Its simplicity is the feature - but it is not built for multi-node scale.
Hardware Reality Check
A self-hosted vector DB for 1-10 million vectors with HNSW indexes needs: 8-16GB RAM, a few CPU cores, and disk. No GPU required. At that size, infrastructure cost is $20-60/month on a small VPS - versus cloud vector pricing that scales with query volume. The crossover is low; most teams with steady RAG traffic save money self-hosting.
Migration Path That Works
Start with Chroma embedded in your prototype. When you need filtering, concurrency, or production durability, move to Qdrant (the API is similar enough that most code changes are import-level). Only reach for Milvus when Qdrant's single-node limits are real - typically at tens of millions of vectors.
FAQ
Do I need a GPU for a vector database? No - vector search is CPU and RAM bound.
Which is fastest? At single-node scale they are within a few percent of each other; filtering support matters more than raw speed.
Can I use Postgres instead? Yes - pgvector works well up to a few million vectors, and many teams prefer keeping one database.
Is self-hosting actually cheaper? For steady traffic, yes - you pay fixed cost instead of per-query fees.
