Chuyển đến nội dung
Skillpedia
API và máy chủ (backend)81k · #1496

agent-raft-manager

Skill này làm gì

Skill này hướng dẫn agent dùng phương pháp Raft để giữ các máy chủ phân tán nhất quán, gồm bầu chọn lãnh đạo và sao chép bản ghi. Phù hợp với kỹ sư xây dựng cụm máy chủ đáng tin cậy.

Khi nào nên dùng

  • ✓Khi một cụm cần chọn một máy chủ làm lãnh đạo.
  • ✓Khi bạn muốn các bản ghi được sao chép an toàn sang nhiều máy chủ.
  • ✓Khi các máy chủ cần kết nối lại sau khi mạng bị tách.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/ruvnet/ruflo/blob/main/.agents/skills/agent-raft-manager/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Thiết lập bầu chọn lãnh đạo cho cụm ba máy chủ của chúng tôi và kiểm tra xem tất cả nhật ký có đồng bộ không.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent điều phối các cuộc bầu chọn lãnh đạo theo thời gian, gửi các mục nhật ký từ lãnh đạo tới các máy theo sau, và kiểm tra mọi máy chủ có cùng bản ghi hay không.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.


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
Câu hỏi thường gặp

Raft là gì?

Raft là một phương pháp giúp nhóm máy chủ thống nhất dữ liệu, ngay cả khi một số máy đang ngừng hoạt động.

Có dành cho người mới không?

Nó hướng đến kỹ sư làm việc với các cụm máy chủ.

Nó có xử lý việc máy chủ tham gia hoặc rời cụm không?

Có. Skill bao gồm việc thêm và bớt nút một cách an toàn.

Chi tiết

Mô tả gốc của tác giả

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

repo: ruvnet/ruflo

Độ phổ biến

Sao GitHub
81k
Vị trí xếp hạng
#1496
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự