# reidddddd/milvus architecture

> Architecture diagram of the GitHub repository reidddddd/milvus, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/reidddddd/milvus
- Repository: https://github.com/reidddddd/milvus

## Overview

Milvus is a distributed vector database, with a standalone deployment option. Its principal workflow is to define a collection, ingest vector and scalar data, then search vectors and retrieve ranked results; documented extensions include metadata filtering, hybrid and full-text search, multiple index types, multi-tenancy, and access control. The graph combines README-documented behavior with the sampled streaming and serialization code. Several component links are omitted because the excerpts do not establish their specific call wiring.

Main entry points: [`client/milvusclient/client.go`](https://github.com/reidddddd/milvus/blob/master/client/milvusclient/client.go) (Go client), [`internal/core/src/query/SearchOnIndex.cpp`](https://github.com/reidddddd/milvus/blob/master/internal/core/src/query/SearchOnIndex.cpp) (Search execution), [`cmd/components/proxy.go`](https://github.com/reidddddd/milvus/blob/master/cmd/components/proxy.go) (Proxy), [`client/milvusclient/read.go`](https://github.com/reidddddd/milvus/blob/master/client/milvusclient/read.go) (Read API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sdk["Client and schema"]
  node_client["Go client<br/>[client.go]"]
  node_client_write["Write API<br/>[write.go]"]
  node_client_read["Read API<br/>[read.go]"]
  node_schema["Collection schema<br/>[schema.go]"]
end

subgraph group_service["Serving and coordination"]
  node_proxy["Proxy<br/>[proxy.go]"]
  node_datacoord["Data coordinator<br/>[data_coord.go]"]
  node_datanode["Data node<br/>[data_node.go]"]
  node_querycoord["Query coordinator<br/>[query_coord.go]"]
  node_querynode["Query node<br/>[query_node.go]"]
end

subgraph group_ingest["Streaming and ingestion"]
  node_stream_pipeline["Stream pipeline<br/>[stream_pipeline.go]"]
  node_query_pipeline["Query pipeline<br/>[pipeline.go]"]
  node_serializer["Storage serializer"]
end

subgraph group_engine["Search and indexes"]
  node_search_exec["Search execution<br/>[SearchOnIndex.cpp]"]
  node_query_plan["Query planning<br/>[Plan.cpp]"]
  node_vector_index["Vector indexes<br/>[VectorIndex.h]"]
  node_scalar_index["Scalar indexes<br/>[ScalarIndex.h]"]
end

subgraph group_state["Storage and security"]
  node_object_storage[("Object storage")]
  node_segment["Segment engine<br/>[SegmentInterface.h]"]
  node_rbac["Access control<br/>[rbac.go]"]
end

node_developer(("Application"))
node_result["Search results"]

node_developer -->|"uses"| node_client
node_client -->|"writes through"| node_client_write
node_client -->|"searches through"| node_client_read
node_client -->|"defines collections"| node_schema
node_client_write -->|"sends writes"| node_proxy
node_client_read -->|"sends searches"| node_proxy
node_proxy -->|"routes ingestion"| node_datanode
node_proxy -->|"routes queries"| node_querycoord
node_datanode -->|"consumes streams"| node_stream_pipeline
node_stream_pipeline -->|"serializes sync data"| node_serializer
node_serializer -->|"writes objects"| node_object_storage
node_querycoord -->|"manages query serving"| node_querynode
node_querynode -->|"constructs pipeline"| node_query_pipeline
node_query_pipeline -->|"uses stream base"| node_stream_pipeline
node_querynode -->|"executes searches"| node_search_exec
node_search_exec -->|"uses plans"| node_query_plan
node_search_exec -->|"searches vectors"| node_vector_index
node_search_exec -->|"filters metadata"| node_scalar_index
node_search_exec -->|"searches segments"| node_segment
node_client_read -->|"returns results"| node_result
node_client -->|"manages permissions"| node_rbac

click node_client "https://github.com/reidddddd/milvus/blob/master/client/milvusclient/client.go"
click node_client_write "https://github.com/reidddddd/milvus/blob/master/client/milvusclient/write.go"
click node_client_read "https://github.com/reidddddd/milvus/blob/master/client/milvusclient/read.go"
click node_schema "https://github.com/reidddddd/milvus/blob/master/client/entity/schema.go"
click node_proxy "https://github.com/reidddddd/milvus/blob/master/cmd/components/proxy.go"
click node_datacoord "https://github.com/reidddddd/milvus/blob/master/cmd/components/data_coord.go"
click node_datanode "https://github.com/reidddddd/milvus/blob/master/cmd/components/data_node.go"
click node_querycoord "https://github.com/reidddddd/milvus/blob/master/cmd/components/query_coord.go"
click node_querynode "https://github.com/reidddddd/milvus/blob/master/cmd/components/query_node.go"
click node_stream_pipeline "https://github.com/reidddddd/milvus/blob/master/internal/util/pipeline/stream_pipeline.go"
click node_query_pipeline "https://github.com/reidddddd/milvus/blob/master/internal/querynodev2/pipeline/pipeline.go"
click node_serializer "https://github.com/reidddddd/milvus/blob/master/internal/flushcommon/syncmgr/storage_serializer.go"
click node_search_exec "https://github.com/reidddddd/milvus/blob/master/internal/core/src/query/SearchOnIndex.cpp"
click node_query_plan "https://github.com/reidddddd/milvus/blob/master/internal/core/src/query/Plan.cpp"
click node_vector_index "https://github.com/reidddddd/milvus/blob/master/internal/core/src/index/VectorIndex.h"
click node_scalar_index "https://github.com/reidddddd/milvus/blob/master/internal/core/src/index/ScalarIndex.h"
click node_object_storage "https://github.com/reidddddd/milvus/blob/master/internal/storage/gcp_native_object_storage.go"
click node_segment "https://github.com/reidddddd/milvus/blob/master/internal/core/src/segcore/SegmentInterface.h"
click node_rbac "https://github.com/reidddddd/milvus/blob/master/client/milvusclient/rbac.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_client,node_client_write,node_client_read,node_schema toneBlue
class node_proxy,node_datacoord,node_datanode,node_querycoord,node_querynode toneAmber
class node_stream_pipeline,node_query_pipeline,node_serializer toneMint
class node_search_exec,node_query_plan,node_vector_index,node_scalar_index toneRose
class node_object_storage,node_segment,node_rbac,node_developer,node_result toneIndigo
```

## Components

### Client and schema

- [Go client](https://github.com/reidddddd/milvus/blob/master/client/milvusclient/client.go): `client/milvusclient/client.go`
- [Write API](https://github.com/reidddddd/milvus/blob/master/client/milvusclient/write.go): `client/milvusclient/write.go`
- [Read API](https://github.com/reidddddd/milvus/blob/master/client/milvusclient/read.go): `client/milvusclient/read.go`
- [Collection schema](https://github.com/reidddddd/milvus/blob/master/client/entity/schema.go): `client/entity/schema.go`

### Serving and coordination

- [Proxy](https://github.com/reidddddd/milvus/blob/master/cmd/components/proxy.go): `cmd/components/proxy.go`
- [Data coordinator](https://github.com/reidddddd/milvus/blob/master/cmd/components/data_coord.go): `cmd/components/data_coord.go`
- [Data node](https://github.com/reidddddd/milvus/blob/master/cmd/components/data_node.go): `cmd/components/data_node.go`
- [Query coordinator](https://github.com/reidddddd/milvus/blob/master/cmd/components/query_coord.go): `cmd/components/query_coord.go`
- [Query node](https://github.com/reidddddd/milvus/blob/master/cmd/components/query_node.go): `cmd/components/query_node.go`

### Streaming and ingestion

- [Stream pipeline](https://github.com/reidddddd/milvus/blob/master/internal/util/pipeline/stream_pipeline.go): `internal/util/pipeline/stream_pipeline.go`
- [Query pipeline](https://github.com/reidddddd/milvus/blob/master/internal/querynodev2/pipeline/pipeline.go): `internal/querynodev2/pipeline/pipeline.go`
- [Storage serializer](https://github.com/reidddddd/milvus/blob/master/internal/flushcommon/syncmgr/storage_serializer.go): `internal/flushcommon/syncmgr/storage_serializer.go`

### Search and indexes

- [Search execution](https://github.com/reidddddd/milvus/blob/master/internal/core/src/query/SearchOnIndex.cpp): `internal/core/src/query/SearchOnIndex.cpp`
- [Query planning](https://github.com/reidddddd/milvus/blob/master/internal/core/src/query/Plan.cpp): `internal/core/src/query/Plan.cpp`
- [Vector indexes](https://github.com/reidddddd/milvus/blob/master/internal/core/src/index/VectorIndex.h): `internal/core/src/index/VectorIndex.h`
- [Scalar indexes](https://github.com/reidddddd/milvus/blob/master/internal/core/src/index/ScalarIndex.h): `internal/core/src/index/ScalarIndex.h`

### Storage and security

- [Object storage](https://github.com/reidddddd/milvus/blob/master/internal/storage/gcp_native_object_storage.go): `internal/storage/gcp_native_object_storage.go`
- [Segment engine](https://github.com/reidddddd/milvus/blob/master/internal/core/src/segcore/SegmentInterface.h): `internal/core/src/segcore/SegmentInterface.h`
- [Access control](https://github.com/reidddddd/milvus/blob/master/client/milvusclient/rbac.go): `client/milvusclient/rbac.go`

### Other components

- **Application**
- **Search results**

## Connections

- Application → Go client: uses
- Go client → Write API: writes through
- Go client → Read API: searches through
- Go client → Collection schema: defines collections
- Write API → Proxy: sends writes
- Read API → Proxy: sends searches
- Proxy → Data node: routes ingestion
- Proxy → Query coordinator: routes queries
- Data node → Stream pipeline: consumes streams
- Stream pipeline → Storage serializer: serializes sync data
- Storage serializer → Object storage: writes objects
- Query coordinator → Query node: manages query serving
- Query node → Query pipeline: constructs pipeline
- Query pipeline → Stream pipeline: uses stream base
- Query node → Search execution: executes searches
- Search execution → Query planning: uses plans
- Search execution → Vector indexes: searches vectors
- Search execution → Scalar indexes: filters metadata
- Search execution → Segment engine: searches segments
- Read API → Search results: returns results
- Go client → Access control: manages permissions
