Milvus
Abstract
Milvus is a scalable vector database designed for large volumes and high loads.
What It Can Do
- Vector search across billions of vectors;
- Horizontal scaling;
- Hybrid search;
- Self-hosted and cloud.
Use Cases
- Large production systems;
- Millions and billions of documents;
- High-load RAG.
Milvus vs Pinecone
| Milvus | Pinecone | |
|---|---|---|
| Deployment | Self-hosted | Cloud |
| Scale | Very large | Large |
| Suitable For | Own infrastructure | Quick start |
Getting Started
The easiest way is through Docker Compose from the official documentation. For development, a lightweight mode (standalone) is sufficient:
curl -sfL https://raw.githubusercontent.com/milvus-io/milvus/master/scripts/standalone_embed.sh | bash
Minimal example in Python:
from pymilvus import MilvusClient
client = MilvusClient("milvus_demo.db")
client.create_collection(
collection_name="docs",
dimension=128,
)
client.insert("docs", [
{"id": 1, "vector": [0.1] * 128},
{"id": 2, "vector": [0.2] * 128},
])
results = client.search(
collection_name="docs",
data=[[0.1] * 128],
limit=5,
)
print(results)
For production, Milvus is deployed as a cluster with separate nodes, making it a worthwhile choice when vector search is the core of the system, not just an auxiliary function.