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 從公開儲存庫中收錄這些內容。

檢舉或申請下架