distributed-systems
Skill0 starsChanged 3 months agoMITView on GitHub
分布式系统:Raft共识、CAP、一致性、幂等、降级熔断.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- base58ed/claude_code_filestheir own version, first seen Oct 20, 2026
- bjornjee/skillstheir own version, first seen Sep 8, 2026
- ctxswitch/skillstheir own version, first seen Sep 7, 2026
- aresbit/claude-skillstheir own version, first seen Jul 12, 2026
- ffsshhttiikk/opencode-agents-skillstheir own version, first seen Feb 28, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- bjornjee/skills★ 2same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- base58ed/claude_code_files★ 1same name
- ctxswitch/skills★ 1same name
- aresbit/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository219 other files it gives its agents.
- agent-doctrineSkill
- agent-evaluation-frameworkSkill
- agent-visualization-flintSkill
- hermes-agentSkill
- bailian-cliSkill
- edge-browser-automationSkill
- computer-useSkill
- jupyter-live-kernelSkill
- backup-strategiesSkill
- browser-automationSkill
- chinese-ai-free-apiSkill
- cicd-pipeline-templatesSkill
- copybaraSkill
- devops-toolkitSkill
- email-deliverabilitySkill
- monitoring-observabilitySkill
- obsidian-maintenanceSkill
- obsidian-troubleshootingSkill
- openclaw-windowsSkill
- openclaw-workerSkill
- webhook-subscriptionsSkill
- windows-dev-environmentSkill
- windows-masterSkill
- zero-downtime-deploySkill
- codebase-inspectionSkill
- github-workflowSkill
- adaptive-communicationSkill
- agent-cost-dashboardSkill
- agent-evolutionSkill
- agent-governanceSkill
- agent-osSkill
- context-efficient-toolsSkill
- context-loss-awarenessSkill
- creative-synthesisSkill
- hermes-desktop-pluginsSkill
- emotional-intelligenceSkill
- graph-engineering-workflowSkill
- hermes-maintenanceSkill
- hermes-voiceSkill
- hermes-hygieneSkill
- identity-coreSkill
- income-loopSkill
- master-synthesisSkill
- meta-cognitionSkill
- reasoning-engineSkill
- self-preservationSkill
- teaching-abilitySkill
- temporal-awarenessSkill
- hermes-themesSkill
- thinking-visualizationSkill
- user-modelingSkill
- voice-full-restoreSkill
- knowledge-graph-traversalSkill
- mcp-browser-canvasSkill
- free-api-gatewaySkill
- native-mcpSkill
- web-reverse-apiSkill
- ai-edaSkill
- huggingface-hubSkill
- industrial-ai-siemens-mcpSkill
- The first 60 shown.
The file
Files
分布式系统
借鉴 awesome-distributed-systems (12k⭐)。
CAP 定理(再强调)
最多同时满足两个:
C 一致性 → 所有节点同一时刻数据相同
A 可用性 → 每个请求都能得到响应
P 分区容错 → 网络断开仍能工作
P 必须满足 → 在 C 和 A 之间选:
CP:银行(一致性优先)
AP:社交媒体(可用性优先)一致性模型
强一致性:写入后立刻能读到(最严格,最慢)
最终一致性:写入后最终能读到(宽松,快)
因果一致性:有因果关系的操作按顺序看到
现实:大多数系统用最终一致性。Raft 共识算法
三个角色:
Leader — 处理所有客户端请求,发送心跳
Follower — 被动响应,接收心跳
Candidate — 竞选 Leader 的中间状态
选举:Follower 收不到心跳 → 变 Candidate → 请求投票 → 多数同意 → 变 Leader
日志复制:Leader 收到写请求 → 追加日志 → 发给 Followers → 多数确认 → 提交幂等性
幂等 = 同一操作执行多次,结果和执行一次相同。
为什么重要:网络重试 → 可能重复执行。
不幂等:扣款 100 元(重复扣 → 扣了 200)
幂等: 设置余额 = 500(重复设 → 还是 500)
实现:唯一请求ID + 数据库唯一约束 + 状态机。服务治理
服务发现:注册中心(Consul/etcd/Nacos)
负载均衡:轮询/加权/最少连接/一致性哈希
熔断: 连续失败 N 次 → 暂时停止调用 → 过一会重试
降级: 高峰期关掉非核心功能
限流: 令牌桶/漏桶/滑动窗口分布式事务
2PC(两阶段提交):
准备阶段 → 所有参与者说"可以"
提交阶段 → 协调者说"提交"或"回滚"
问题:协调者挂了就卡住
Saga(补偿事务):
每个步骤有对应的补偿操作
失败了就逆序执行补偿
适合:微服务架构时钟与顺序
不能依赖物理时钟!(NTP 同步有误差)
用逻辑时钟:Lamport 时钟、向量时钟
分布式 ID:Snowflake(Twitter)Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

