Milvus Architecture Explained: How the Vector Database Works

A Milvus architecture diagram explained: layers, node roles, sharding, deployment modes, GPU indexes and their effect on recall and latency under load.

Milvus Architecture Explained: How the Vector Database Works
Written by TechnoLynx Published on 11 Jul 2026

A Milvus architecture diagram shows four layers that scale and recover independently of each other. There is an access layer of stateless proxies, a coordinator that schedules the cluster, worker nodes that ingest, index and search, and a storage layer made of a metadata store, a write-ahead log (WAL) and object storage. The workers are stateless because storage and compute are kept separate, which helps scale-out and disaster recovery. The index you pick matters, but the split matters more.

Milvus is a specialised vector database. That puts it in a different category from vector extensions added to relational databases, such as pgvector, and from search libraries such as FAISS. The architecture matters most when Milvus serves the retrieval step of retrieval augmented generation. We cover how that retrieval cost spreads into the rest of the serving stack in our piece on how retrieval latency becomes a GPU bottleneck.

How Does Milvus Work? The Layers in the Architecture Diagram

The official Milvus documentation describes the design as “data plane and control plane disaggregation”. In practice that means four layers, each independent of the others for scaling and disaster recovery.

  • Access layer. Stateless proxies validate client requests and sit behind a load balancer such as Nginx, Kubernetes Ingress, NodePort or LVS. Because Milvus uses a massively parallel processing design, the proxies also merge intermediate results before anything goes back to the client.
  • Coordinator. Exactly one coordinator is active at any moment. It maintains the cluster topology, schedules every type of task and is responsible for cluster-level consistency.
  • Worker nodes. Streaming nodes, query nodes and data nodes are, in the documentation’s words, “dumb executors that follow instructions from the coordinator”.
  • Storage. etcd holds metadata snapshots such as collection schemas and message consumption checkpoints. It was chosen because metadata needs high availability, strong consistency and transaction support. The WAL records every change before it is committed, and object storage such as S3 persists the large files: indexes and binary logs.

Why keep compute and storage apart? The 2021 SIGMOD paper that introduced Milvus describes a shared-storage distributed system that separates computing from storage “to achieve the best elasticity”, the same pattern Snowflake and Aurora use. The current documentation says workers are stateless because of this separation, and that this is what makes scale-out and disaster recovery on Kubernetes workable.

Recent writes are protected by the WAL, not by any worker. Once data is committed to the WAL it cannot be lost: if a streaming node crashes, it replays the log to recover every pending operation. The streaming coordinator assigns each WAL to a streaming node. Each WAL runs on exactly one streaming node at a time, which the WAL storage enforces with fencing alongside the coordinator.

Why Older Milvus Diagrams Show Different Boxes

In earlier versions the proxy wrote streaming data to the WAL, and query and data nodes read it back. The Streaming Node, introduced in 2.5.0 and generally available from 2.6.0, now handles all shard-level WAL reads and writes and also acts as the query delegator. Version 2.6 replaced Kafka and Pulsar with Woodpecker, a WAL built for object storage. It merged RootCoord, QueryCoord and DataCoord into a single coordinator called MixCoord. It also folded IndexNode into DataNode and moved data persistence onto the Streaming Node.

If a diagram shows Pulsar, three separate coordinators and a dedicated index node, it describes the earlier architecture. Do not use it to size a current cluster.

What Do the Coordinator, Proxy, Worker Nodes and Object Storage Each Do?

Component What it does State How many
Proxy Validates requests, aggregates intermediate results into the final answer Stateless One or more per cluster
Coordinator (MixCoord) Owns topology, schedules tasks, keeps the cluster consistent, hands off sealed segments to query nodes One active instance; master-slave mode available for high availability One active
Streaming node Shard-level “mini-brain”: orders writes with a timestamp oracle, writes the WAL, serves queries on growing data, builds query plans, converts growing data to sealed data Recoverable from the WAL One or more per cluster
Query node Loads sealed (historical) segments from object storage and searches them Loaded from object storage One or more per cluster
Data node Builds per-segment indexes and runs compaction, bulk import and statistics collection Stateless Scaled as needed
Meta store Holds metadata such as collection schemas and checkpoints (etcd) Durable External dependency
WAL storage Holds the durable write log (Woodpecker by default; Pulsar or Kafka also supported) Durable External dependency or embedded
Object storage Persists binary logs and index files (MinIO or S3) Durable Third-party dependency

A Write and a Search Through a Milvus Cluster, Step by Step

A write travels through the cluster in this order:

  1. The proxy receives the insert. The entity’s ID is hashed, and the hash decides which shard writes it.
  2. The streaming node that owns the shard gives each data packet a timestamp-oracle (TSO) timestamp, which puts all operations in one order. It checks consistency and then writes the data to the WAL.
  3. The data goes into a growing segment on that streaming node, where searches can reach it before it is sealed.
  4. Once every WAL entry for the segment has been ingested, the streaming node flushes it. The segment becomes sealed: immutable, persisted to object storage and optimised for reads.
  5. A data node loads the segment from object storage, builds its index and writes the index back to object storage.
  6. The coordinator runs a handoff and spreads sealed segments evenly across query nodes, balancing memory use, CPU load and segment count.

A search runs as a two-level fan-out. The proxy sends the request to every streaming node that holds a relevant shard. Each of those nodes builds a query plan, searches its own growing data, fetches historical results from query nodes and merges them into one shard result. The proxy then merges the shard results and returns the final answer.

How Does Milvus Shard a Collection, and How Do Query and Data Nodes Scale Independently?

You choose how many shards a collection gets. Each shard maps to a virtual channel (vchannel), each vchannel is assigned to a physical channel (pchannel), and each pchannel is bound to one streaming node. Shards spread the write load, and segments spread the read load. A collection is split into segments, each with its own index, and those segments are searched in parallel at query time.

Partitions are a separate mechanism, built for targeted reads rather than for distributing writes. When you set a scalar field as the partition key, Milvus hashes its value, takes the result modulo the partition count to pick a partition, and creates 16 partitions by default. A search that filters on that key then scans only the partitions that match. Each partition usually holds many different key values, so Milvus still checks the filter against every entity in the partitions it scans. Without a scalar index on the key field, that check is a full scan, and on large collections it can take up a large share of search latency. Partition Key Isolation goes further and builds a separate index per key value, but it currently works only with HNSW.

Ingest and search scale separately because they run on different nodes. New data lands on streaming nodes, sealed data is served by query nodes, and the coordinator spreads sealed segments across however many query nodes you run. The deployment documentation describes this as handling ingestion and search on isolated nodes. You size those nodes for the workload in front of you, whether that is heavy reads with occasional writes or heavy writes with occasional reads. Query nodes need enough memory to hold the in-memory indexes of the segments they serve.

Shard count deserves the most thought up front. Each vchannel maps through a pchannel to one streaming node, so the shard count sets how many streaming nodes can share one collection’s ingest. Adding query nodes later is cheap by comparison. Zilliz’s own advice is to add shards for faster writes, “but not too much!”.

The scaling evidence depends on the setup. The 2021 SIGMOD paper, on a three-layer design with a single writer, reported throughput rising linearly as nodes were added. A study of vector databases on HPC systems found something else. Milvus insertion peaked at 61,344 vectors per second with 16 proxies and streaming nodes, then fell. Across the vector databases it tested, query performance often levelled off as cores were added, and communication costs limited scaling across nodes.

Its hardware was HPC rather than cloud, though, so treat it as a warning to measure, not as a fixed limit.

How Does the Milvus Architecture Affect Vector Search Recall and Latency Under Concurrent Read and Write Load?

Writing while you search costs throughput and latency. Fresh vectors sit in unindexed segments, and every search has to scan those segments exhaustively, which makes queries slower. In the HPC study, concurrent inserts and queries cut Milvus throughput by 23.44% and raised latency by 34.99% on average. Its throughput drop was the smallest of the three systems tested: Weaviate lost 38.37% and Qdrant 50.57%. The cost shows up as higher query latency.

The same study found two more costs that come from the architecture. The first is index settling. After the initial index build, background optimisation keeps running, and querying the unoptimised index cut throughput by up to 9.6 times on one dataset. The second is write amplification: the study measured 2.8 times storage overhead in Milvus.

Consistency Levels Decide What a Search Is Allowed to See

Milvus offers four consistency levels: strong, bounded staleness, session and eventually. Bounded staleness is the default. Each level maps to a guarantee timestamp (GuaranteeTs): a search does not run until all data written before that timestamp is visible. Strong waits for the newest timestamp. Bounded staleness reads a slightly older view. Session guarantees a client sees its own writes. Eventually skips the check entirely. The documentation is explicit that strong consistency raises latency.

It also says bounded staleness can occasionally leave fresh data invisible, which has little effect on recall in something like a recommender system. Remember this when you measure recall during ingest. If a vector inserted a moment ago is missing from the results, users experience that as a recall miss, even though the index did nothing wrong.

Filtered Search Has a Latency Floor

Milvus evaluates filters first. It builds a bitset of the entities that pass the filter and uses it to guide the approximate nearest-neighbour search. Its search engine, Knowhere, is built on FAISS. A study of filtered search found that Milvus switches between two methods depending on the filter. Under moderate filters it uses “Dual-Pool” graph traversal, which keeps the search from running out of candidates. Under strict filters it falls back to brute force, for both HNSW and IVFFlat, which keeps the results accurate. The authors’ advice: plan for a latency floor, because Milvus will not return fast, low-quality results the way FAISS or pgvector can.

Two findings from the same study change how you should tune. In low-selectivity scenarios, partition-based IVFFlat can be more robust than HNSW, because of its efficient cluster pruning. And because search parameters fix the size of the candidate pool, efSearch or nprobe should grow in step with k whenever recall matters.

Segment Layout, Index Type and GPU Indexes

Segment count also affects recall. Milvus searches the HNSW graph in each segment in parallel and merges the per-segment top-k results. In the HPC study, whichever system used more segments got higher recall, with diminishing returns beyond some point.

Indexes are built per segment by data nodes, stored in object storage and loaded into query nodes’ memory for search. The SIGMOD paper groups the core index families into quantization-based IVF variants and graph-based indexes such as HNSW.

GPU indexes are another index choice in Milvus. Milvus offers:

  • GPU_CAGRA, a graph index designed for GPUs.
  • GPU_IVF_FLAT and GPU_IVF_PQ.
  • GPU_BRUTE_FORCE, which guarantees a recall of 1.

The documentation warns that a GPU index may not lower latency compared with a CPU index. Getting the most throughput out of one takes very high request pressure or large numbers of query vectors. Milvus currently loads every index into GPU memory. GPU_CAGRA needs about 1.8 times the size of the raw vectors, GPU_IVF_FLAT and brute force need the same as the raw data, and GPU_IVF_PQ needs less depending on compression. That makes GPU memory size the limit on how much data can be loaded for GPU search. In the HPC study, GPU indexing at 10 million points ran 10.04 times faster on the higher-dimensional dataset and 3.86 times faster on the other.

Our judgement is that GPUs pay off in Milvus for index builds and for batch-heavy, high-concurrency search. They rarely pay off for single-query latency. The cost side of that decision is covered in Milvus licensing, GPU footprint and utilisation cost.

Milvus Lite vs Standalone vs Distributed: Which Deployment Should You Use?

Milvus comes in three deployment modes: Lite, Standalone and Distributed. All three depend on a message queue, object storage and a metadata store, which by default are Woodpecker, MinIO and etcd.

Milvus Lite is a Python library that ships inside pymilvus. It runs without a server and keeps its data in local files. It has the same APIs as the other modes, but it does not behave the same way. Lite uses a FLAT index whatever index type you ask for. It does not support partitions, partition keys or setting a shard count, and it treats every consistency setting as strong. It also has no users, roles or aliases, although its data can be exported to the other modes.

Milvus Standalone packs every component into one Docker image and runs embedded Woodpecker, so there is no separate messaging service to operate. All components run in a single process. Zilliz says it offers high availability through a primary-backup mode.

Milvus Distributed runs on Kubernetes. It handles ingestion and search on isolated nodes, keeps redundant copies of critical components and gives the most scalability and availability of the three.

The sources disagree on size limits. The official deployment overview puts Lite at up to a few million vectors, Standalone at up to 100 million, and Distributed at anything from 100 million to tens of billions. A Zilliz comparison blog gives lower ceilings: up to one million vectors for Lite, and one million to tens of millions for Standalone. We would plan around the official deployment documentation. Read the blog’s figures as a conservative margin.

Mode Runs as Good fit What you give up
Lite Python library, local files Prototypes, notebooks, small experiments Real indexes, partitions, shards, tunable consistency
Standalone One Docker image, one process Early production without Kubernetes, up to about 100M vectors Separate scaling of ingest and search; one machine’s limits
Distributed Kubernetes cluster Large or growing collections, mixed read and write load, availability needs Simplicity: you operate the cluster and its dependencies

One practical warning: benchmarks run on Lite do not test the index you configured. Lite always searches with FLAT, so its recall is exact and its latency grows the way brute force does. Neither carries over to an HNSW or IVF collection on Standalone.

When is Milvus the right choice over a lighter embedded store? Zilliz places Milvus Lite and Chroma together as suited to data up to about one million vectors. Distributed suits workloads that need ingest and search on isolated nodes, separately sized capacity and redundant components. You pay for that with Kubernetes, etcd, object storage and a WAL to operate. If your corpus fits on one machine, writes arrive in batches, and nobody will notice a short pause while you rebuild, an embedded library or Standalone is the honest choice. If you are still comparing engines, our open source vector database comparison sets Milvus against the alternatives for AI workloads.

How Should You Think About Milvus Architecture in Practice?

Treat each box in the diagram as something you size, monitor and can lose on its own. The questions we would settle before production follow directly from the architecture:

  • Shard count. Set it from expected write concurrency, not collection size, because each vchannel is served by one streaming node.
  • Query node memory. Size it for the in-memory indexes of the sealed segments each node will hold.
  • Consistency level per query path. Use strong only where read-your-writes is truly required, since it adds latency.
  • Filter fields. If you filter on a partition key, give that field a scalar index.
  • Measurement conditions. Test recall and latency while ingesting, and again after background index optimisation finishes. In the HPC study, throughput on the unoptimised index was up to 9.6 times lower.
  • Recovery path. Know what etcd, the WAL and object storage each hold before you need them.

For test design, see our piece on benchmarking vector databases and SQL engines for real workloads. On recovery, see how Milvus backup and restore work. See also our page on running AI in a production SaaS platform.

What stays open is how much fresh-data scanning, consistency waiting and filter fallback your latency budget can absorb at peak ingest. That depends on your write rate, your filters and your recall target, so measure it on your workload rather than reading it off a diagram. For more explainers, see our AI explainer articles hub.

FAQ

What Is Milvus Used For?

Milvus is an open-source vector database that stores, indexes and retrieves vector embeddings at billion scale. It supports plain similarity search, similarity search with attribute filters, and multi-vector queries that combine scores across several vectors per entity.

What Are Some Examples of Vector Databases?

Researchers sort vector search systems into three groups. Specialised vector databases include Milvus, Pinecone and Weaviate. Vector extensions for relational databases include pgvector. Search libraries include FAISS.