milvus-io/milvus
Milvus is a high-performance, cloud-native vector database built for scalable vector ANN search
Distributed vector database for AI applications with multi-language client SDKs
Vector data flows from clients through Proxy to coordinators, then to worker nodes for processing and storage, with real-time streaming support
Under the hood, the system uses 4 feedback loops, 4 data pools, 5 control points to manage its runtime behavior.
Structural Verdict
A 10-component fullstack with 14 connections. 4195 files analyzed. Highly interconnected — components depend on each other heavily.
How Data Flows Through the System
Vector data flows from clients through Proxy to coordinators, then to worker nodes for processing and storage, with real-time streaming support
- Client Request — gRPC/HTTP requests sent to Proxy with authentication and routing
- Coordinator Processing — DataCoord or QueryCoord processes requests and manages worker node assignments
- Worker Execution — DataNode ingests and indexes data; QueryNode executes searches on loaded segments
- Storage Persistence — Data persisted to object storage (S3/MinIO) with metadata in etcd
- Message Queue Streaming — Real-time updates propagated through message queue (Pulsar/Kafka/RocksMQ)
- Telemetry Collection — Client metrics collected and reported to server with command push/pull capability
System Behavior
How the system actually operates at runtime — where data accumulates, what loops, what waits, and what controls what.
Data Pools
Cluster metadata, collection schemas, and coordination state
Vector segments, indexes, and binary logs
Insert/delete messages, CDC events, and streaming updates
Loaded vector indexes and segments for search
Feedback Loops
- Load Balancing (auto-scale, balancing) — Trigger: Query load metrics from QueryNode. Action: QueryCoord redistributes segments. Exit: Load balanced across nodes.
- Compaction Scheduling (scheduled-job, balancing) — Trigger: DataCoord monitors segment sizes. Action: Triggers compaction jobs on DataNode. Exit: Segments optimized.
- Telemetry Heartbeat (polling, reinforcing) — Trigger: Timer-based intervals. Action: Client sends metrics to server. Exit: Never (continuous).
- Coordinator Health Check (retry, balancing) — Trigger: gRPC connection failures. Action: Retry with exponential backoff. Exit: Connection restored or max retries.
Delays & Async Processing
- Message Queue Batch Processing (batch-window, ~configurable interval) — Groups insert operations for efficient processing
- Index Building (async-processing, ~varies by data size) — Search unavailable until index complete
- Segment Loading (async-processing, ~varies by segment size) — Collection not searchable until loaded
- Telemetry Reporting (scheduled-job, ~HeartbeatInterval (10s default)) — Metrics may be up to interval delayed
Control Points
- Message Queue Type (env-var) — Controls: Switch between Pulsar/Kafka/RocksMQ. Default: pulsar
- Storage Provider (env-var) — Controls: Object storage backend selection. Default: minio
- Telemetry Sampling Rate (runtime-toggle) — Controls: Percentage of operations to collect. Default: 1.0
- Compaction Trigger Threshold (threshold) — Controls: When to trigger segment compaction
- gRPC Max Message Size (env-var) — Controls: Maximum RPC payload size
Package Structure
This monorepo contains 6 packages:
The main Milvus vector database server with internal distributed system components and command-line tooling.
Go client SDK for Milvus with support for vector operations, bulk import, and schema management.
Shared utilities and infrastructure components including streaming, metrics, logging, and message queue abstraction.
Standalone demo showcasing Milvus telemetry features with HTTP API and WebUI integration.
End-to-end test application for validating Milvus telemetry command push and response flows.
Integration test suite for the Go client SDK with base utilities and response checkers.
Technology Stack
Primary backend language for distributed system
Inter-service communication protocol
Distributed metadata store and coordination
Default message queue for streaming data
Object storage for vector data and indexes
Metrics collection and monitoring
Schema definition and serialization
HTTP server framework for REST APIs
Access control and authorization
Distributed tracing and observability
Key Components
- MilvusClient (service) — Main client interface for connecting to Milvus and performing vector operations
client/milvusclient/client.go - Proxy (service) — Gateway service handling gRPC/HTTP requests and routing to appropriate coordinators
internal/proxy/proxy.go - DataCoord (service) — Coordinates data ingestion, compaction, and segment lifecycle management
internal/datacoord/server.go - QueryCoordV2 (service) — Manages query operations, load balancing, and query node orchestration
internal/querycoordv2/server.go - RootCoord (service) — Central coordinator managing collections, schemas, and cluster metadata
internal/rootcoord/server.go - DataNode (service) — Processes data ingestion, indexing, and persistence to object storage
internal/datanode/server.go - QueryNodeV2 (service) — Executes vector similarity search and filtering operations on loaded segments
internal/querynodev2/server.go - StreamingNode (service) — Handles real-time data streaming and change data capture operations
internal/streamingnode/server.go - BulkImportAPI (handler) — HTTP client for bulk data import operations using REST API
client/bulkwriter/bulk_import.go - TelemetryManager (service) — Collects and reports client metrics with command push/pull capabilities
examples/telemetry_demo/main.go
Sub-Modules
Standalone telemetry demonstration with HTTP server and WebUI
End-to-end testing tool for telemetry command push/pull flows
Integration test suite for Go client SDK with utilities and response checkers
Configuration
codecov.yml (yaml)
codecov.require_ci_to_pass(string, unknown) — default: nocodecov.notify.require_ci_to_pass(string, unknown) — default: nocodecov.notify.wait_for_ci(boolean, unknown) — default: falsecodecov.ci(array, unknown) — default: jenkins.milvus.io:18080coverage.precision(number, unknown) — default: 2coverage.round(string, unknown) — default: downcoverage.range(string, unknown) — default: 70...100coverage.status.project.default.target(string, unknown) — default: 77%- +11 more parameters
docker-compose.yml (yaml)
version(string, unknown) — default: 3.5x-ccache.CCACHE_COMPILERCHECK(string, unknown) — default: contentx-ccache.CCACHE_COMPRESS(number, unknown) — default: 1x-ccache.CCACHE_COMPRESSLEVEL(number, unknown) — default: 5x-ccache.CCACHE_MAXSIZE(string, unknown) — default: 2Gx-ccache.CCACHE_DIR(string, unknown) — default: /ccacheservices.builder.image(string, unknown) — default: ${IMAGE_REPO}/milvus-env:${OS_NAME}-${DATE_VERSION}services.builder.build.context(string, unknown) — default: .- +69 more parameters
tests/python_client/common/common_params.py (python-dataclass)
description(str, unknown) — default: None
tests/python_client/common/common_params.py (python-dataclass)
index_type(str, unknown) — default: Noneparams(dict, unknown) — default: Nonemetric_type(str, unknown) — default: None
Explore the interactive analysis
See the full architecture map, data flow, and code patterns visualization.
Analyze on CodeSeaRelated Fullstack Repositories
Frequently Asked Questions
What is milvus used for?
Distributed vector database for AI applications with multi-language client SDKs milvus-io/milvus is a 10-component fullstack written in Go. Highly interconnected — components depend on each other heavily. The codebase contains 4195 files.
How is milvus architected?
milvus is organized into 5 architecture layers: Client SDKs, Proxy Layer, Coordinators, Worker Nodes, and 1 more. Highly interconnected — components depend on each other heavily. This layered structure enables tight integration between components.
How does data flow through milvus?
Data moves through 6 stages: Client Request → Coordinator Processing → Worker Execution → Storage Persistence → Message Queue Streaming → .... Vector data flows from clients through Proxy to coordinators, then to worker nodes for processing and storage, with real-time streaming support This pipeline design reflects a complex multi-stage processing system.
What technologies does milvus use?
The core stack includes Go (Primary backend language for distributed system), gRPC (Inter-service communication protocol), etcd (Distributed metadata store and coordination), Apache Pulsar (Default message queue for streaming data), MinIO/S3 (Object storage for vector data and indexes), Prometheus (Metrics collection and monitoring), and 4 more. This broad technology surface reflects a mature project with many integration points.
What system dynamics does milvus have?
milvus exhibits 4 data pools (etcd MetaStore, Object Storage), 4 feedback loops, 5 control points, 4 delays. The feedback loops handle auto-scale and scheduled-job. These runtime behaviors shape how the system responds to load, failures, and configuration changes.
What design patterns does milvus use?
5 design patterns detected: Microservices Architecture, gRPC Service Layer, Message Queue Abstraction, Object Storage Abstraction, Telemetry & Observability.
Analyzed on March 31, 2026 by CodeSea. Written by Karolina Sarna.