distributed-systems

Design distributed systems with consensus algorithms, partitioning strategies, and replication patterns.

1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts --skill distributed-systems-kalilurrahman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: distributed-systems
Source: https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts/tree/main/06-system-design/distributed-systems
Command: npx skills add https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts --skill distributed-systems-kalilurrahman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Designing systems that span multiple servers or datacenters requires navigating CAP trade-offs, consensus protocols, and failure modes that single-server architectures never face. This Skill provides structured guidance for making those architectural decisions correctly. ## Core Features & Use Cases - CAP Trade-off Analysis: Choose between consistency and availability with concrete guidance on CA, CP, and AP system designs. - Partitioning & Consensus: Implement consistent hashing, Raft leader election, quorum-based replication, and leaderless architectures with working code examples. - Failure Handling: Apply saga patterns for distributed transactions, vector clocks for conflict detection, and gossip protocols for cluster membership. - Use Case: When building a multi-region service that must survive datacenter outages, use this Skill to select Raft for leader election, configure quorum writes (W + R > N), and set up split-brain prevention with ZooKeeper. ## Quick Start Design a distributed architecture for a multi-region application with eventual consistency, consistent hashing across shards, and Raft-based leader election.

Frequently Asked Questions about distributed-systems

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose between consistency and availability in a distributed system?

CAP theorem states you can only guarantee two of consistency, availability, and partition tolerance. Since network partitions are unavoidable, choose CP (like HBase or MongoDB with majority writes) for strong consistency, or AP (like Cassandra or DynamoDB) for availability with eventual consistency.

Raft vs Paxos: which consensus algorithm should I use?

Raft is more practical and easier to implement, using leader election and log replication with clear state transitions between follower, candidate, and leader. Paxos is more general but notoriously difficult to implement correctly, so Raft is preferred for most systems like etcd.

How does consistent hashing reduce data movement when adding nodes?

Consistent hashing maps nodes and keys onto a hash ring, assigning each key to the closest node clockwise. Adding a node only redistributes keys in its immediate range rather than reshuffling everything, moving roughly 1/N of the data.

How do I prevent split-brain in a distributed cluster?

Use quorum-based decisions requiring a majority of nodes, such as 3 out of 5, to elect a leader or commit writes. Only the partition side holding a majority can make progress, preventing two leaders from operating simultaneously.

When should I use sagas instead of two-phase commit?

Use sagas when services must remain available during failures, since two-phase commit blocks if the coordinator crashes. Sagas execute local transactions with compensating actions, such as refunding a payment when inventory reservation fails.

What are the limitations of leaderless replication?

Leaderless replication requires quorum tuning (W + R > N) to guarantee read-your-writes consistency, and concurrent writes need conflict resolution via vector clocks, last-write-wins, or CRDTs. It trades simplicity of failover for complexity in conflict handling.