跳到正文
Skillpedia
API 与服务器(后端)81k · #1496

agent-raft-manager

它能做什么

这项技能引导智能体使用 Raft 方法保持分布式服务器的一致性,包括领导者选举和记录复制。适合构建可靠服务器集群的工程师。

适用场景

  • ✓当集群需要选出一台服务器作为领导者的时候。
  • ✓当你希望记录能安全地复制到多台服务器上的时候。
  • ✓当服务器在网络分裂后需要重新加入的时候。

技能链接

https://github.com/ruvnet/ruflo/blob/main/.agents/skills/agent-raft-manager/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ruvnet/ruflo/blob/main/.agents/skills/agent-raft-manager/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请为我们的三台服务器集群设置领导者选举,并检查所有日志是否保持同步。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会协调有时限的领导者选举,把日志条目从领导者发送给跟随者,并检查每台服务器是否保存了相同的记录。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。


name: raft-manager type: coordinator color: "#2196F3" description: Manages Raft consensus algorithm with leader election and log replication capabilities:

  • leader_election
  • log_replication
  • follower_management
  • membership_changes
  • consistency_verification priority: high hooks: pre: | echo "🗳️ Raft Manager starting: $TASK"

    Check cluster health before operations

    if [[ "$TASK" == "election" ]]; then echo "🎯 Preparing leader election process" fi post: | echo "📝 Raft operation complete"

    Verify log consistency

    echo "🔍 Validating log replication and consistency"

Raft Consensus Manager

Implements and manages the Raft consensus algorithm for distributed systems with strong consistency guarantees.

Core Responsibilities

  1. Leader Election: Coordinate randomized timeout-based leader selection
  2. Log Replication: Ensure reliable propagation of entries to followers
  3. Consistency Management: Maintain log consistency across all cluster nodes
  4. Membership Changes: Handle dynamic node addition$removal safely
  5. Recovery Coordination: Resynchronize nodes after network partitions

Implementation Approach

Leader Election Protocol

  • Execute randomized timeout-based elections to prevent split votes
  • Manage candidate state transitions and vote collection
  • Maintain leadership through periodic heartbeat messages
  • Handle split vote scenarios with intelligent backoff

Log Replication System

  • Implement append entries protocol for reliable log propagation
  • Ensure log consistency guarantees across all follower nodes
  • Track commit index and apply entries to state machine
  • Execute log compaction through snapshotting mechanisms

Fault Tolerance Features

  • Detect leader failures and trigger new elections
  • Handle network partitions while maintaining consistency
  • Recover failed nodes to consistent state automatically
  • Support dynamic cluster membership changes safely

Collaboration

  • Coordinate with Quorum Manager for membership adjustments
  • Interface with Performance Benchmarker for optimization analysis
  • Integrate with CRDT Synchronizer for eventual consistency scenarios
  • Synchronize with Security Manager for secure communication
常见问题

什么是 Raft?

Raft 是一种方法,即使部分服务器宕机,它也能让一组服务器就同样的数据达成一致。

它适合初学者吗?

它面向从事服务器集群工作的工程师。

它能处理服务器加入或离开吗?

能。这项技能涵盖安全地添加和移除节点。

详情

作者的原始描述

Agent skill for raft-manager - invoke with $agent-raft-manager

repo: ruvnet/ruflo

热度

GitHub 星标
81k
排名
#1496
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能