This is the code repository for The Architecture Handbook for Milvus Vector Database, First Edition, published by Packt.
Yudong Cai, Jeremy Zhu, Xuan Yang, Bang Fu

âââââ
âââââ
âââââ
The rapid adoption of LLMs demands efficient storage and lightning-fast retrieval of unstructured data. Designed as a vector database, Milvus has earned widespread recognition in the community and support from tech giants like Apple and NVIDIA. Yet, many developers only scratch the surface of what Milvus is truly capable of. Written by the contributors of the Milvus project, this handbook gives you an insiderâs perspective on its design and how it handles large-scale, high-dimensional vector data. Starting with the basics, youâll learn about everything from service deployment and SDK usage to Milvusâ layered architecture and how its components interact. Youâll learn how the indexing, replication, compaction, and garbage collection systems work and how to apply them to real scenarios. Through practical demos and configuration exercises, youâll learn how to monitor, scale, and secure Milvus in production and then advance to performance evaluation and scalability testing using tools like VectorDBBench. You'll also explore Milvus' integration with LangChain for use cases such as vector search and RAG-based chatbots. By the end of this book, youâll be able to analyze Milvus internals, fine-tune for performance, ensure system stability, and integrate it into next-generation AI solutions. *Email sign-up and proof of purchase required
- Deploy Milvus using Docker, Kubernetes, and Helm
- Configure Milvus and monitor system health with Prometheus, Grafana, and Loki
- Understand core components like Knowhere, indexes, time sync, compaction, and garbage collection
- Design and optimize schema, queries, and data modification flows
- Benchmark performance and simulate real-world failure recovery
- Scale Milvus clusters to support large datasets and high-concurrency traffic
- Apply security hardening, rate-limiting, and role-based access control
- Build AI applications using Milvus with LangChain
## Technical Requirements
To get the most out of this book, you should meet the following prerequisites:
- Basic understanding of Python programming
- Familiarity with machine learning concepts
- Basic understanding of large language models (LLMs)
- Experience working with APIs and AI development environments
- Foundational knowledge of databases
- Familiarity with containerization tools such as Docker
- Basic understanding of orchestration tools such as Kubernetes
- Experience with distributed systems (optional but beneficial)
- No prior in-depth knowledge of vector databases is required
- Visual Studio Code (VS Code) or any preferred code editor
- Python 3.x
- Docker
- Kubernetes (K8s)
- macOS
- Linux
- A machine with at least 8 GB RAM (recommended for running complex examples)
- Access to a Python development environment
-
If using the digital version of this book, it is recommended to type the code manually
-
This helps avoid errors caused by copying and pasting code
Yudong Cai Yudong Cai is a senior software engineer with over 20 years of experience in large-scale system development. As one of the founding members of the Milvus project, he helped build Milvus from the ground up and has been involved in the development and iteration of every version since its initial open-source release. His key contributions include delivering the first production-grade Range Search implementation, as well as the refactoring of the entire Milvus configuration system, alongside the design and implementation of numerous other critical features. He is also the original developer and key maintainer of Knowhere, Milvus' core vector computation engine, where he designed its architecture to support multiple hardware acceleration frameworks and a wide range of vector search algorithms.
Jeremy Zhu Jeremy Zhu is a quality assurance engineer at Zilliz, focused on ensuring the robustness and high performance of the Milvus vector database. His core responsibilities include designing comprehensive test cases, developing automated system test pipelines for diverse scenarios, and executing rigorous stress, recovery, and performance testing. Jeremy possesses deep expertise in chaos engineering, distributed systems testing, and test automation frameworks, playing a key role in maintaining Milvus' high-quality standards.
Xuan Yang Xuan Yang is a senior software engineer at Zilliz in China, passionate about designing high-performance, scalable distributed database systems. As a core Milvus contributor, she architected the DataNode module, implemented the compaction process, and led the L0 segment design. She is the primary maintainer of PyMilvus, the official Python SDK, and VectorDBBench, an open-source benchmarking framework for vector databases. She cares deeply about system stability and performance and is always eager to collaborate with the community to push the boundaries of large-scale AI and vector data infrastructure.
Bang Fu Bang Fu is a senior software engineer at Zilliz. With extensive experience in both Go and Python, he has actively contributed to the development of several key features for Milvus, including permission verification, request interception, incremental synchronization, and serverless metering functionalities. He is also interested in AI technology and led the development of the GPTCache project, which focuses on caching LLM responses to improve speed and reduce costs. In addition, he has participated in the development of the DeepSearcher project.