qdrant-horizontal-scaling
它能做什么
帮你判断应该通过增加机器(横向扩展)还是提升现有机器的性能(纵向扩展)来扩充 Qdrant 数据库。它会指导你如何设置节点和分片的数量,以保证性能和可靠性。
适用场景
- ✓当你的数据增长到单台机器装不下时。
- ✓如果你希望在某台机器发生故障时,系统仍能继续运行。
- ✓当你想把数据和用户分成更小的组,以便更好地管理时。
技能链接
https://github.com/github/awesome-copilot/blob/main/skills/qdrant-scaling/scaling-data-volume/horizontal-scaling/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的数据已经无法放进一台机器,我应该增加机器还是升级现有的机器?节点和分片各应该用多少?”
每周 5 个新技能,1 分钟读完。
工作原理
这个工具会分析你是否需要更多容量,并建议扩展 Qdrant 的最佳方式。它会权衡应该增加机器还是提升现有机器的性能,并推荐合适的分片和副本数量,以确保数据安全且易于访问。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
What to Do When Qdrant Needs More Capacity
Vertical first: simpler operations, no network overhead, good up to ~100M vectors per node depending on dimensions and quantization. Horizontal when: data exceeds single node capacity, need fault tolerance, need to isolate tenants, or IOPS-bound (more nodes = more independent IOPS).
Most basic distributed configuration
- 3 nodes, 3 shards with
replication_factor: 2for zero-downtime scaling
Minimum of 3 nodes is important for consensus and fault tolerance. With 3 nodes, you can lose 1 node without downtime. With 2 nodes, losing 1 node causes downtime for collection operations.
Replication factor of 2 means each shard has 1 replica, so you have 2 copies of data. This allows for zero-downtime scaling and maintenance. With replication_factor: 1, zero-downtime is not guaranteed even for point-level operations, and cluster maintenance requires downtime.
Choosing number of shards
Shards are the unit of data distribution. More shards allows more nodes and better distribution, but adds overhead. Fewer shards reduces overhead but limits horizontal scaling.
For cluster of 3-6 nodes the recommended shard count is 6-12. This allows for 2-4 shards per node, which balances distribution and overhead.
Changing number of shards
Use when: shard count isn't evenly divisible by node count, causing uneven distribution, or need to rebalance.
Resharding is expensive and time-consuming, it should be used as a last resort if regular data distribution is not possible. Resharding is designed to be transparent for user operations, updates and searches should still work during resharding with some small performance impact.
But resharding operation itself is time-consuming and requires to move large amounts of data between nodes.
- Available in Qdrant Cloud Resharding
- Resharding is not available for self-hosted deployments.
Better alternatives: over-provision shards initially, or spin up new cluster with correct config and migrate data.
What NOT to Do
- Do not jump to horizontal before exhausting vertical (adds complexity for no gain)
- Do not set
shard_numberthat isn't a multiple of node count (uneven distribution) - Do not use
replication_factor: 1in production if you need fault tolerance - Do not add nodes without rebalancing shards (use shard move API to redistribute)
- Do not scale down RAM without load testing (cache eviction causes days-long latency incidents)
- Do not hit the collection limit by using one collection per tenant (use payload partitioning)
常见问题
什么是横向扩展?
指增加更多机器(节点),把工作负载和数据分散到各台机器上,而不是只升级单台机器。
为什么建议最少使用 3 个节点?
有 3 个节点时,即使其中一台机器发生故障,系统仍能继续运行。如果只有 2 个节点,一旦丢失一台机器,操作就会中断。
什么是分片和副本?
分片是数据的一部分,副本是这些分片的副本。拥有多份副本(复制)可以确保数据不会丢失,并且在某台机器故障时系统仍能正常运行。
详情
作者的原始描述
Diagnoses and guides Qdrant horizontal scaling decisions. Use when someone asks 'vertical or horizontal?', 'how many nodes?', 'how many shards?', 'how to add nodes', 'resharding', 'data doesn't fit', or 'need more capacity'. Also use when data growth outpaces current deployment.
repo: github/awesome-copilot
热度
- GitHub 星标
- 40k
- 排名
- #7366
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
acquire-codebase-knowledge
40k帮你的智能体理解并编写现有代码项目的文档。它有助于新成员快速上手,或者快速了解项目架构。
acreadiness-assess
40k让你的智能体评估一个项目对 AI 的准备程度,并生成报告。它有助于了解项目在使用 AI 工具方面的准备情况。
acreadiness-generate-instructions
40k帮你的智能体根据评估结果编写 AI 工具的指令文件。它有助于改善 AI 与代码的交互方式,并弥补已发现的不足。
acreadiness-policy
40k让你的智能体协助制定或应用 AI 项目评估的政策。它有助于规范项目的评估方式,并确保合规。