Milvus 和 Qdrant 对比:开源向量数据库怎么选
Milvus 和 Qdrant 对比,核心区别在架构:两者都是 Apache-2.0 开源向量数据库,但 Milvus 是存算分离的分布式向量数据库,数据在对象存储,查询、写入、索引节点各自弹性扩缩,可支撑数百亿向量;Qdrant 是对等节点架构:分片存在各节点本地磁盘,部署更轻。需要独立扩展写入、查询和索引时,优先评估 Milvus;偏好对等节点部署与 payload 过滤模型时,可评估 Qdrant。
- Apache-2.0,GitHub 40K+ star
- 可扩展到数百亿向量
- 存储与计算分离
- 多租户向量数据库:partition key 支持百万级租户
- Salesforce
- Walmart
- NVIDIA
- eBay
- IBM
- Cisco
- Roblox
- Exa.ai
- OpenEvidence
- Read.ai
- Plaud
- Filevine
Milvus 和 Qdrant 扩展性对比:十亿级向量检索怎么撑?
Milvus 是存算分离架构。segment 和 WAL 都在对象存储里,新加的 query 节点直接加载分配给它的 segment,不用从别的节点拷盘;写入、检索、建索引分别由不同类型的节点承担,各自扩缩。tiered storage 还能让单个节点服务超过自身内存和磁盘的数据量。
Qdrant 采用 shared-nothing 模式:每个节点自己存储、建索引、服务自己的分片。官方文档写明,自建集群的分片数不重建 collection 就无法修改,新节点加入时是空的,自动 rebalance 和 resharding 只在 Qdrant Cloud 提供;文档建议起步时设 12 个分片。
| 能力 | Milvus | Qdrant(自建) |
|---|---|---|
| 架构 | 存算分离:proxy、streaming、query、data 节点 | 对等节点,Raft 维护集群拓扑和 collection 元数据 |
| 数据存放 | 对象存储(S3、MinIO、Azure Blob、GCS),WAL 也在其中 | 各节点本地 mmap 文件 |
| 节点独立扩缩 | query、streaming、data 节点分别扩缩 | 每个节点同时负责存储、建索引和查询 |
| 新增节点 | 从对象存储加载 segment | 空节点,需迁移分片 |
| 分片与 resharding | 分片数建表时设定;segment 可分布到任意数量的 query 节点 | 不重建 collection 无法改分片数;resharding 仅 Qdrant Cloud |
| 数据超过单节点容量 | tiered storage 按需拉取字段数据 | 本地磁盘上的 cached / cold 分层 |
| 大规模多租户 | partition key 支持百万级租户;也可按 database、collection、partition 隔离 | is_tenant payload 索引;tiered multitenancy 把大租户提升到独占分片 |
Milvus 和 Qdrant 性能对比:谁更快?
向量数据库性能对比看 VectorDBBench 排行榜:无论纯向量检索还是过滤检索性能,Zilliz Cloud 和自建 Milvus 的 QPS 都是 Qdrant Cloud 的数倍,P99 延迟也更低。
- Zilliz CloudZillizCloud-8cu-perf13,316.23 QPSP99 2 ms · 召回率 0.9383
- MilvusMilvus-16c64g-sq4u-fp16-force_merge9,575.69 QPSP99 2.3 ms · 召回率 0.9189
- Qdrant CloudQdrantCloud-16c64g1,242.43 QPSP99 6.4 ms · 召回率 0.9474
- Zilliz CloudZillizCloud-8cu-perf-partition_key10,020.53 QPSP99 2.6 ms · 召回率 0.9788
- MilvusMilvus-16c64g-sq8-partition_key11,280.08 QPSP99 1.6 ms · 召回率 0.9507
- Qdrant CloudQdrantCloud-16c64g-payload-index1,494.53 QPSP99 7.0 ms · 召回率 1.0
来源:VectorDBBench 排行榜(zilliz.com/vdbbench-leaderboard),系统标签原样引用。结果因配置而异,建议用自己的数据跑一遍。
Zilliz Cloud 就是全托管的 Milvus:同样的引擎、同一梯队的性能,不用自己规划集群、升级和扩容。
免费试用 Zilliz CloudQdrant 和 Milvus 功能对比:向量数据库对比表
两者都覆盖了现代检索的核心能力。常有人问:Qdrant 支持混合检索吗?支持,Query API 用 prefetch 配 RRF 或 DBSF 融合。差别在广度:Milvus 的索引类型更多,便于按成本和硬件选型,全文检索有服务端内置的 BM25 函数,过滤是先过滤再做 ANN。
| 功能 | Milvus | Qdrant |
|---|---|---|
| 稠密向量索引类型 | HNSW、IVF(FLAT、SQ8、PQ、RaBitQ)、SCANN、DiskANN、GPU(CAGRA、IVF) | HNSW |
| 量化 | SQ8、PQ、PRQ、RaBitQ;HNSW_SQ、HNSW_PQ、HNSW_PRQ | 标量、二值(1、1.5、2 bit)、乘积、非对称量化 |
| 稀疏向量 | SPARSE_INVERTED_INDEX | 稀疏向量,倒排索引 |
| BM25 与全文检索 | 内置 BM25 函数,服务端把原始文本转成稀疏向量 | full-text payload 索引;BM25 通过 qdrant/bm25 模型或 FastEmbed 生成,配 IDF modifier |
| 混合检索 | 单次查询多个向量字段,RRF 或加权 ranker 融合 | Query API prefetch,RRF 或 DBSF 融合 |
| 多向量 | 默认每个 collection 最多 10 个向量字段 | named vectors;multivector 支持 MAX_SIM |
| JSON / payload 过滤与索引 | JSON 字段 + JSON path 索引;INVERTED、BITMAP、STL_SORT 标量索引 | keyword、integer、float、bool、geo、datetime、uuid、text 索引;filterable HNSW |
| 过滤执行方式 | 先按标量条件过滤,再在命中集合内做 ANN 检索;复杂表达式可用 iterative_filter hint | 带 payload 索引的 filterable HNSW |
| 多租户 | database、collection、partition 或 partition key | is_tenant 索引、自定义 shard key、tiered multitenancy |
| 部署方式 | Milvus Lite、Standalone、Distributed、Zilliz Cloud | 本地模式、单机(Docker)、集群、Qdrant Cloud、Hybrid Cloud、Private Cloud |
| 许可证与社区 | Apache-2.0;Go 和 C++(Knowhere 引擎);LF AI & Data 毕业项目;GitHub 40K+ star | Apache-2.0;GitHub 30K+ star |
| SDK 语言 | Python、Java、Go、Node.js、C#、C++、Rust、RESTful | Python、JavaScript/TypeScript、Rust、Go、.NET、Java |
| 框架集成 | langchain-milvus、LlamaIndex、Haystack、Dify、n8n | langchain-qdrant、llama-index-vector-stores-qdrant |
Milvus 和 Qdrant 哪个更容易自建部署?
Qdrant 一条 docker run 就能起,每个节点始终是一个二进制。Milvus 按数据量分三种形态:嵌在 pymilvus 里的 Milvus Lite(Milvus 轻量级版本)、单容器的 Standalone、Kubernetes 上的 Milvus 分布式部署(Distributed)。运行成本取决于数据放在哪:Milvus 把 segment 放对象存储,query 节点只按热数据配容量;Qdrant 每个节点都要用本地内存和磁盘装下自己的分片。
| 阶段 | Milvus | Qdrant |
|---|---|---|
| 原型验证 | pip install pymilvus 即进程内运行 Milvus Lite,数百万向量以内 | docker run qdrant/qdrant,或 Python 客户端的本地模式 |
| 单机 | Standalone:单容器、内嵌 etcd,约 1 亿向量以内 | 单节点,分片在本地磁盘 |
| 集群 | Distributed:Kubernetes 上用 Milvus Operator 或 Helm 部署,数据在对象存储;1 亿到数百亿向量 | Raft 对等节点;分片数要提前定,文档建议从 12 起步 |
Qdrant 和 Milvus 哪个好?什么情况下 Qdrant 更合适
Qdrant 的对等节点部署可减少需要运维的服务类型。应根据分片规划、过滤需求、运维条件和实测性能选择,不能把集合规模当作产品能力的硬边界。
- 数据能放进单机或小集群,分片数可以一开始就定好。
- 只想跑一个 Rust 进程的 Docker 容器,不引入对象存储和 Kubernetes。
- 内存吃紧,需要精细调标量、二值、乘积或非对称量化。
- 已经在用 Qdrant Cloud,rebalance 和 resharding 由平台托管。
- SaaS 中少数大租户适合 tiered multitenancy 的独占分片。
Milvus 还是 Qdrant:一张选型清单
Qdrant 和 Milvus 对比很少卡在功能上,分歧是规模和运维,对着下表找自己的情况。
| 你的情况 | 选择 |
|---|---|
| 数据一台机器放得下,而且会一直放得下 | Qdrant 单节点或 Milvus Standalone |
| 数据量、租户数或流量会超过一台机器 | Milvus Distributed:新 query 节点直接从对象存储加载 segment |
| 单个 collection 里有百万级租户 | Milvus partition key |
| 少数几个大租户 | Qdrant tiered multitenancy,或 Milvus 每租户一个 collection |
| 一次查询同时要关键词和语义相关性 | Milvus 服务端 BM25 配 hybrid_search;Qdrant 用 qdrant/bm25 模型 |
| 完全不想自己跑集群 | Zilliz Cloud 或 Qdrant Cloud |
哪些 AI 公司和大型企业在生产环境用 Milvus?
从 AI 原生公司到大型企业,都在生产环境运行 Milvus 或 Zilliz Cloud(托管 Milvus)。milvus.io 用户墙上有 Salesforce、Walmart、NVIDIA、eBay、IBM、Cisco、Roblox、Reddit,也有 Exa.ai、OpenEvidence、Read.ai、Notta.ai、Plaud、Filevine。公开案例中的结果:
- OpenEvidence:基于 Zilliz Cloud,检索延迟低于 10 ms,峰值 4,000 QPS。
- Plaud:每个区域 100 亿+ 向量块,平均召回延迟低于 200 ms。
- Exa:借助混合检索,神经搜索延迟从秒级降到 200 ms 以内。
- Airtable:在 Kubernetes 上用 Milvus Operator 自建 Milvus,支撑语义检索。
延伸阅读
- What determines vector-database scalability?
- How do sharding and replication differ in a vector database?
- How do you choose a vector index for your workload?
- When should you use DISKANN in Milvus?
- What is hybrid search, and when should you use it?
- How should you design multi-tenancy for vector search?
- How should you benchmark vector search performance?
常见问题
Milvus 和 Qdrant 谁更快?
VectorDBBench Cohere 1M 测试中,Milvus-16c64g-sq8-force_merge 为 5,973 QPS(召回率 0.9192),QdrantCloud-16c64g 为 1,242.43 QPS(0.9474)。10M 数据边写入 500 行/秒边查询时,QdrantCloud-16c64g 为 393.8 QPS,该 Milvus 配置为 306。
Qdrant 能扩展到十亿级向量吗?
Qdrant 靠加节点、加分片横向扩展。自建集群的分片数建表时固定,新节点加入时为空;resharding 和自动 rebalance 只在 Qdrant Cloud 提供。Milvus Distributed 文档标称支持数百亿向量。
Milvus 和 Qdrant 哪个更容易自建部署?
单节点 Qdrant 就是一个二进制,起得最快。Milvus Lite(pip 安装)和 Standalone(单容器、内嵌 etcd)同样简单;Distributed 多出 Kubernetes 和对象存储,换来各类节点独立扩缩。
什么规模需要分布式向量数据库?
按 Milvus 文档:Milvus Lite 适合数百万向量以内,Standalone 单容器到约 1 亿,Distributed 覆盖 1 亿到数百亿。
从 Qdrant 切换到 Milvus 要重新生成向量吗?
不用。VTS(Vector Transport Service)把 Qdrant 列为源端连接器,collection、向量和 payload 原样拷贝。把 payload 字段映射成标量或 JSON 字段,建好索引,双写到结果对齐再切流量。
RAG 场景该选 Milvus 还是 Qdrant?
两者都能做带过滤和混合检索的 RAG。语料和租户数增长后,Milvus 的服务端 BM25、更多索引类型和 partition key 多租户更有优势;集合规模稳定的场景,Qdrant 也够用。
不想自己运维集群?
Zilliz Cloud 是 Milvus 原班团队提供的全托管服务,MilvusClient API 与本地一致。可以先用开源 Milvus 起步,再迁到托管服务,应用代码不用重写。
资料来源与技术文档 (45)
- https://milvus.io
- https://github.com/milvus-io/milvus
- https://milvus.io/docs/architecture_overview.md
- https://milvus.io/docs/install-overview.md
- https://milvus.io/docs/scaleout.md
- https://milvus.io/docs/tiered-storage-overview.md
- https://milvus.io/docs/create-collection.md
- https://milvus.io/docs/index-explained.md
- https://milvus.io/docs/full-text-search.md
- https://milvus.io/docs/multi-vector-search.md
- https://milvus.io/docs/json-indexing.md
- https://milvus.io/docs/multi_tenancy.md
- https://github.com/qdrant/qdrant
- https://qdrant.tech/documentation/scaling/distributed_deployment/
- https://qdrant.tech/documentation/scaling/horizontal-scaling/
- https://qdrant.tech/documentation/concepts/indexing/
- https://qdrant.tech/documentation/guides/quantization/
- https://qdrant.tech/documentation/concepts/storage/
- https://qdrant.tech/documentation/concepts/vectors/
- https://qdrant.tech/documentation/concepts/hybrid-queries/
- https://qdrant.tech/documentation/search/text-search/full-text-search/
- https://qdrant.tech/documentation/guides/multiple-partitions/
- https://qdrant.tech/course/beginners/module-4/where-it-runs/
- https://zilliz.com/vdbbench-leaderboard
- https://github.com/zilliztech/VectorDBBench
- https://github.com/zilliztech/VectorDBBench/blob/main/vectordb_bench/results/leaderboard_v2.json
- https://github.com/zilliztech/VectorDBBench/blob/main/vectordb_bench/results/leaderboard_v2_streaming.json
- https://zilliz.com/customers/filevine
- https://zilliz.com/customers/openevidence
- https://zilliz.com/customers/exa
- https://zilliz.com/customers/airtable
- https://zilliz.com/customers/plaud
- https://zilliz.com/customers/read-ai
- https://zilliz.com/customers/meituan
- https://milvus.io/docs/zh/quickstart.md
- https://cloud.zilliz.com.cn/signup
- https://qdrant.tech/documentation/quickstart/
- https://qdrant.tech/documentation/frameworks/langchain/
- https://qdrant.tech/documentation/frameworks/llama-index/
- https://milvus.io/docs/install_standalone-docker.md
- https://milvus.io/docs/filtered-search.md
- https://milvus.io/docs/integrations_overview.md
- https://github.com/zilliztech/knowhere
- https://github.com/zilliztech/vts
- https://lfaidata.foundation/projects/