Agent Raft Manager

ruvnet/ruflo/.agents/skills/agent-raft-manager

作者 ruvnet6051f6702b61无许可证74K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库今天更新

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

仅含说明DevOps & Cloud
AI 生成的概览

协调 Raft 共识操作:领导者选举、日志复制、一致性与成员变更。

功能
该技能提供在分布式系统中管理 Raft 共识集群的指令,涵盖基于随机超时的领导者选举、追加条目日志复制、提交索引跟踪以及基于快照的日志压缩。它还描述容错处理,例如领导者故障检测、网络分区恢复以及安全的动态成员变更,并说明与仲裁管理器、性能基准测试等相关角色的协作。
适用场景
当分布式系统需要 Raft 共识协调时使用,例如执行或恢复领导者选举、向跟随者传播日志条目,或变更集群成员。它也适用于需要一致性验证或在网络分区后重新同步节点的场景。
运行要求
不包含脚本,仅为指令。执行所述操作需要一个基于 Raft 的分布式集群,以及代理执行 shell 命令的能力,因为前置元数据中的钩子包含 shell 片段。

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

来源与署名

来源:ruvnet/ruflo位于.agents/skills/agent-raft-manager提交6051f67

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架