Milvus Storage-Compute Separation Series-1: Introduction to Milvus Architecture
First published on Medium
Preface
Storage-compute separation is a hot topic, with virtually every database claiming to have implemented or planning to implement a storage-compute separation architecture. However, the definition of “storage” and “compute” varies for different types of data systems. This series will provide an overview of Milvus’ storage-compute separation architecture and discuss the author’s views on this concept in the context of specific problem scenarios.
The overall architecture of Milvus storage-compute separation
Due to the “re-indexing” and “re-computation” characteristics of vector queries, the storage-compute separation in Milvus has two implications
The first point is the separation of processes for generating storage files and conducting query computations.
The overall read-write process of Milvus is as follows:
- The proxy writes messages (msgs) into a message queue (typically Kafka, Pulsar, or Rocksmq).
- Datanode nodes consume messages from the message queue.
- Datanode nodes generate corresponding data partitions, known as segments, and upload them to object storage.
- MixCoord, or the coordination node, collects the generated segments.
- MixCoord instructs QueryNode nodes to load the corresponding segments for querying purposes.
Therefore, from this process, the generation of storage files occurs on the DataNode, while the querying computations occur on the QueryNode. These two processes do not interfere with each other and can be independently scaled. During periods of heavy querying computation, the number and resources of QueryNodes can be scaled, while during times of high write pressure, the DataNode nodes and resources can be scaled.
Another aspect of storage-compute separation is the separation of data storage location (object storage) and computation location (QueryNode). Milvus segments are immutable, so they naturally support “write once, read many” scenarios.
So, how does Milvus perform queries on tables?
First, let’s clarify a few concepts:
QueryNode: Milvus worker nodes where the queries actually occur.
QueryCoord: Query coordination node, managing all QueryNodes.
Proxy: Milvus query proxy, directly interact with clients.
Collection: A collection in Milvus can be simplifed as a database table.
Segment: A Query Unit in Milvus, which can be understood as a data partition (similar to Kudu tablet or Elasticsearch shard).
Delegator: Query leader, responsible for aggregating query results from the segments it oversees.
As shown in the diagram above, a single Milvus collection can be considered to have five segments (Segment 1–5), distributed across three QueryNode nodes. The Delegator is distributed on QueryNode 2. The query process unfolds as follows:
- The proxy requests information about the distribution of Milvus Delegator from the QueryCoord and learns that the Delegator for this collection is on QueryNode 2.
- The proxy sends a query request to QueryNode 2.
- The Delegator receives the request and forwards it to QueryNode 1 and QueryNode 3, obtaining query results from all segments.
- The Delegator aggregates all query results and returns them to the proxy.
(To be continued)
— MrPresent-Han

