milvus-io/milvus

Data

A vector database for storing embeddings and running scalable similarity search behind AI search and RAG applications.

46,536
4,320
Go
Apache-2.0
7 years old

Milvus is a vector database intended for teams that need to keep large collections of embeddings searchable rather than train models themselves. It stores vectors alongside scalar fields such as integers, strings and JSON, and supports nearest-neighbour search with metadata filtering. That makes it useful when an application's retrieval layer must grow beyond a single machine.

What it does and how it works

Vectors are inserted into named collections with a declared dimension; queries return the top-k nearest results, and the returned fields can be selected. The database supports HNSW, IVF, FLAT, SCANN and DiskANN indexes, with quantised variants and mmap options for different memory/cost trade-offs.

Its distinguishing mechanism is a distributed design: a K8s-native deployment separates compute and storage, so query nodes can be added for read-heavy traffic and data nodes for write-heavy traffic. Replicas place data segments on multiple query nodes for fault tolerance and throughput. Sparse and dense vectors can share a collection, enabling BM25 full-text search or learned sparse embeddings combined with semantic search and reranking.

Ways to run it

The README documents three paths with different prerequisites:

  • Milvus Lite: pip install pymilvus[milvus-lite], then instantiate a client with a local file path. This is the quickest path for prototyping in Python.
  • Standalone server: a Docker-based single-machine deployment, which the client connects to with a URI and credentials.
  • Distributed cluster: the fully distributed, K8s-native mode aimed at horizontal scaling on large vector volumes.

To build from source, the README lists Linux (Ubuntu 20.04+), Intel macOS (Big Sur 11.5+) or Apple Silicon macOS (Monterey 12.0.1+), with Go ≥1.21, CMake ≥3.26.4 and <4, and Python >3.8 and ≤3.11; the Linux path also expects GCC ≥11, while macOS paths expect llvm ≥15.

Operational features and scope

The project advertises user authentication, TLS encryption and role-based access control, which matter if the database holds user or business data. Multi-tenancy can be isolated at database, collection, partition or partition-key level. Hot/cold storage keeps frequently accessed data in memory or on SSDs and moves colder data to cheaper media.

These are author-described capabilities; the README does not document upgrade or rollback behaviour, nor provide independent performance validation. The benchmark link points to a vendor benchmarking tool, so treat results as vendor-reported. The code is Apache-2.0 licensed and governed by the LF AI & Data Foundation.

The ecosystem includes a Python SDK, an admin GUI (Attu), Prometheus/Grafana monitoring, CDC synchronisation and connectors for Spark, Kafka, Fivetran and Airbyte. Tutorials cover RAG, hybrid search, image and multimodal search and recommendations.

Project source and documentation

Written by AI from the project's README, updated October 30, 2026. The project's own docs are the source of truth.