Milvus (vector database)
{{Short description|Open-source distributed vector database}}
{{Multiple issues|
{{copy edit|date=November 2024}}
{{coi|date=November 2024}}
}}
{{Infobox software
| name = Milvus
| logo = Milvus-logo-color-small.png
| logo size = 220px
| developer = Zilliz
| released = {{Start date and age|2019|10|19}}
| latest release version = v2.5.11
| latest release date = {{Start date and age|2025|04|28}}.:{{cite web|url=https://github.com/milvus-io/milvus/releases/tag/v2.5.11|title=Release notes for Milvus v2.5.11|website=GitHub }}
| repo = {{URL|https://github.com/milvus-io/milvus}}
| programming language = C++, Go
| operating system = Linux, macOS
| genre = Vector database
| license = Apache License 2.0
| website = {{URL|https://milvus.io/}}
}}
Milvus is a distributed vector database developed by Zilliz. It is available as both open-source software and a cloud service.
Milvus is an open-source project under LF AI & Data Foundation{{cite web|url=https://lfaidata.foundation/blog/2021/06/23/lf-ai-data-foundation-announces-graduation-of-milvus-project/|title=LF AI & Data Foundation Announces Graduation of Milvus Project|date=June 23, 2021}} distributed under the Apache License 2.0.
History
Milvus has been developed by Zilliz since 2017.{{cite web |last=Liao |first=Ingrid Lunden and Rita |date=2022-08-24 |title=Zilliz raises $60M, relocates to SF
|url=https://techcrunch.com/2022/08/24/zilliz-the-startup-behind-the-milvus-open-source-vector-database-for-ai-applications-raises-60m-and-relocates-to-sf/ |access-date=2024-10-21 |website=TechCrunch |language=en-US}}
Milvus joined Linux Foundation as an incubation project in {{date|January 2020}} and became a graduate in {{date|June 2021}}. The details about its architecture and possible applications were presented on ACM SIGMOD Conference in 2021{{cite conference|doi=10.1145/3448016.3457550|title=Milvus: A Purpose-Built Vector Data Management System|pages=2614–2627|date=June 18, 2021|book-title=SIGMOD '21: Proceedings of the 2021 International Conference on Management of Data|isbn=978-1-4503-8343-1|url=https://dl.acm.org/doi/pdf/10.1145/3448016.3457550}}
Milvus 2.0, a major redesign of the whole product with a new architecture,{{cite arXiv|title=Manu: A Cloud Native Vector Database Management System|eprint=2206.13843 |last1=Guo |first1=Rentong |last2=Luan |first2=Xiaofan |last3=Xiang |first3=Long |last4=Yan |first4=Xiao |last5=Yi |first5=Xiaomeng |last6=Luo |first6=Jigao |last7=Cheng |first7=Qianya |last8=Xu |first8=Weizhi |last9=Luo |first9=Jiarui |last10=Liu |first10=Frank |last11=Cao |first11=Zhenshan |last12=Qiao |first12=Yanliang |last13=Wang |first13=Ting |last14=Tang |first14=Bo |last15=Xie |first15=Charles |date=2022 |class=cs.DB }} was released in {{date|Jan 2022}}.
Features
=Similarity search=
Major similarity search related features that are available in the active 2.4.x Milvus branch:{{cite web|url=https://milvus.io/docs/overview.md|title=Milvus overview|access-date=September 23, 2024}}
- In-memory, on-disk and GPU indices,
- Single query, batch query and range query search,
- Support of sparse vectors, binary vectors, JSON and arrays,
- FP32, FP16 and BF16 data types,
- Euclidean distance, inner product distance and cosine distance support for floating-point data,
- Hamming distance and jaccard distance for binary data,
- Support of graph indices (including HNSW), Inverted-lists based indices and a brute-force search.
- Support of vector quantization for lossy input data compression, including product quantization (PQ) and scalar quantization (SQ), that trades stored data size for accuracy,
- Re-ranking.
Milvus similarity search engine relies on heavily-modified forks of third-party open-source similarity search libraries, such as Faiss,{{cite web|url=https://github.com/facebookresearch/faiss|title=Faiss|website=GitHub |access-date=September 23, 2024}}{{cite arXiv|title=The Faiss library|eprint=2401.08281 |last1=Douze |first1=Matthijs |last2=Guzhva |first2=Alexandr |last3=Deng |first3=Chengqi |last4=Johnson |first4=Jeff |last5=Szilvasy |first5=Gergely |last6=Mazaré |first6=Pierre-Emmanuel |last7=Lomeli |first7=Maria |last8=Hosseini |first8=Lucas |last9=Jégou |first9=Hervé |date=2024 |class=cs.LG }} DiskANN{{cite web|url=https://github.com/microsoft/DiskANN|title=DiskANN library|website=GitHub |access-date=September 23, 2024}}{{cite journal |last1=Subramanya |first1=Suhas Jayaram |last2=Kadekodi |first2=Rohan |last3=Krishaswamy |first3=Ravishankar |last4=Simhadri |first4=Harsha Vardhan |title=DiskANN: fast accurate billion-point nearest neighbor search on a single node |journal=Proceedings of the 33rd International Conference on Neural Information Processing Systems |date=8 December 2019 |pages=13766–13776 |url=https://dl.acm.org/doi/abs/10.5555/3454287.3455520 |publisher=Curran Associates Inc.}} and hnswlib.{{cite web|url=https://github.com/nmslib/hnswlib|title=Hnswlib - fast approximate nearest neighbor search|website=GitHub |access-date=September 23, 2024}}
Milvus includes optimizations for I/O data layout, specific to graph search indices.{{cite journal|doi=10.1145/3639269|title=Starling: An I/O-Efficient Disk-Resident Graph Index Framework for High-Dimensional Vector Similarity Search on Data Segment|date=2024 |last1=Wang |first1=Mengzhao |last2=Xu |first2=Weizhi |last3=Yi |first3=Xiaomeng |last4=Wu |first4=Songlin |last5=Peng |first5=Zhangyang |last6=Ke |first6=Xiangyu |last7=Gao |first7=Yunjun |last8=Xu |first8=Xiaoliang |last9=Guo |first9=Rentong |last10=Xie |first10=Charles |journal=Proceedings of the ACM on Management of Data |volume=2 |pages=1–27 |arxiv=2401.02116 }}
=Database=
As a database, Milvus provides the following features:
- Column-oriented database
- Four supported data consistency levels, including strong consistency and eventual consistency.{{cite web|url=https://milvus.io/docs/consistency.md|title=Consistency levels in Milvus|access-date=September 29, 2024}}
- Data sharding
- Streaming data ingestion, which allows to process and ingest data in real-time as it arrives
- A dynamic schema, which allows inserting the data without a predefined schema
- Independent storage and compute layers
- Multi-tenancy scenarios (database-oriented, collection-oriented, partition-oriented){{cite web|url=https://milvus.io/docs/multi_tenancy.md|title=Multi-tenancy strategies|access-date=September 29, 2024}}
- Memory-mapped data storage
- Role-based access control
- Multi-vector and hybrid search{{cite web|url=https://milvus.io/docs/multi-vector-search.md|title=Hybrid Search|access-date=September 23, 2024}}
= Deployment options =
Milvus can be deployed as an embedded database, standalone server, or distributed cluster. Zillis Cloud offers a fully managed version.{{cite web |url=https://zilliz.com/cloud |title=Zilliz cloud |access-date=October 10, 2024}}
= GPU support =
Milvus provides GPU accelerated index building and search using Nvidia CUDA technology{{cite web|url=https://zilliz.com/blog/milvus-2-3-beta-new-features-and-updates|title=What's New In Milvus 2.3 Beta - 10X faster with GPUs|access-date=September 29, 2024}}{{cite web|url=https://www.datanami.com/2023/03/23/milvus-2-3-launches-with-support-for-nvidia-gpus/|title=Milvus 2.3 Launches with Support for Nvidia GPUs|date=23 March 2023 |access-date=September 29, 2024}} via Nvidia RAFT library,{{cite web|url=https://github.com/rapidsai/raft|title=NVIDIA RAFT library|website=GitHub }} including a recent GPU-based graph indexing algorithm Nvidia CAGRA{{cite arXiv|title=CAGRA: Highly Parallel Graph Construction and Approximate Nearest Neighbor Search for GPUs|date=August 2023|eprint=2308.15136 |last1=Ootomo |first1=Hiroyuki |last2=Naruse |first2=Akira |last3=Nolet |first3=Corey |last4=Wang |first4=Ray |last5=Feher |first5=Tamas |last6=Wang |first6=Yong |class=cs.DS }}
=Integration=
Milvus provides official SDK clients for Java, NodeJS, Python and Go.{{cite web|url=https://milvus.io/docs/install-go.md|title=Install Milvus Go SDK|access-date=September 29, 2024}} An additional C# SDK client was contributed by Microsoft.{{cite web|url=https://devblogs.microsoft.com/dotnet/get-started-milvus-vector-db-dotnet/|title=Get Started with Milvus Vector DB in .NET|access-date=September 29, 2024|date=March 6, 2024}} The database can integrate with Prometheus and Grafana for monitoring and alerts, frameworks Haystack{{cite web|url=https://haystack.deepset.ai/integrations/milvus-document-store|title=Integration HayStack + Milvus|access-date=September 23, 2024}} and LangChain,{{cite web|url=https://python.langchain.com/docs/integrations/vectorstores/milvus/|title=Milvus connector for LangChain|access-date=September 23, 2024}} IBM Watsonx,{{cite web|url=https://www.ibm.com/blog/announcement/ibm-watsonx-data-vector-database-ai-ready-data-management/|title=IBM watsonx.data's integrated vector database: unify, prepare, and deliver your data for AI|website=IBM |date=April 9, 2024|access-date=September 29, 2024}} and OpenAI models.{{cite web|url=https://cookbook.openai.com/examples/vector_databases/milvus/getting_started_with_milvus_and_openai|title=Getting started with Milvus and OpenAI|date=Mar 28, 2023|access-date=September 23, 2024}}{{cite web|url=https://github.com/Snaiel/OpenAI-Milvus-QA-Over-Docs|title=OpenAI and Milvus simple app|website=GitHub |access-date=September 23, 2024}}
See also
{{Portal|Free and open-source software}}