Design and evaluate decentralized peer-to-peer architectures and core system mechanisms.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "system-type-peer-to-peer" skill from askskill: 1. Download https://raw.githubusercontent.com/microsoft/amplifier-bundle-systems-design/main/skills/system-type-peer-to-peer/SKILL.md 2. Save it as ~/.claude/skills/system-type-peer-to-peer/SKILL.md 3. Reload skills and tell me it's ready
Design an architecture for a global P2P file distribution system. Focus on network topology, peer discovery, NAT traversal, data sharding and replication, fault tolerance, and how to maintain availability and scalability without a central server.
A structured architecture proposal covering core components, communication flows, key trade-offs, and risks.
Evaluate whether a decentralized instant messaging network design is sound. Analyze its identity and trust model, message routing, offline message handling, consistency strategy, censorship resistance, and potential security and performance issues, then suggest improvements.
An evaluation report identifying strengths, weaknesses, major risks, and actionable recommendations.
Design node incentive and reputation mechanisms for a decentralized content storage network. Explain how to encourage bandwidth and storage contribution, prevent Sybil attacks, free-riding, and malicious behavior, while maintaining fairness and long-term sustainability.
A design outline for incentives and reputation, including rules, attack mitigations, and implementation guidance.
Patterns, failure modes, and anti-patterns for decentralized peer-to-peer systems.
When to use. Systems where any peer can hold any data and queries are exploratory — file sharing (early Gnutella), social feeds, informal mesh networks. When simplicity and resilience to churn matter more than lookup efficiency. When to avoid. Systems that need efficient key-based lookups. Large networks where flooding creates unacceptable bandwidth overhead. When query latency must be predictable. Key decisions. TTL (time-to-live) on forwarded messages, fanout degree (how many peers each node forwards to), duplicate message suppression, supernode election for partial structure.
When to use. Efficient key-value lookups in a decentralized network — content-addressable storage, distributed hash tables (Kademlia, Chord, Pastry). When you need O(log n) lookups instead of flooding. When to avoid. When keyword search or range queries are needed (DHTs only do exact key lookup). When the network has extremely high churn (DHT routing tables become stale faster than they can repair). Very small networks where the DHT overhead exceeds the benefit. Key decisions. Hash function and key space design, replication factor (k-bucket size in Kademlia), routing table refresh strategy, handling network partitions and merges, iterative vs recursive lookup.
When to use. When pure decentralization is a goal but some coordination is practical — BitTorrent (trackers + DHT), Skype's original architecture, many production P2P systems. Super-peers handle discovery and coordination; regular peers handle data transfer. When to avoid. When the super-peers become single points of failure that negate the decentralization benefit. When regulatory requirements demand fully decentralized operation. Key decisions. Super-peer election and rotation, fallback when super-peers fail, load balancing across super-peers, preventing super-peer capture or censorship, graceful degradation to pure P2P when coordination layer fails.
When to use. Local-area networks, IoT device clusters, real-time collaboration with small groups. When peers need direct, low-latency communication and the group size is bounded. When to avoid. Large networks — full mesh is O(n^2) connections. Wide-area networks where direct connections between all peers are impossible. Key decisions. Mesh density (full vs partial), relay selection for peers that can't connect directly, mesh topology maintenance, partition detection and healing.
When to use. Discovering your public IP and port mapping when behind a NAT. The first step in establishing direct peer connections. Works for most consumer NATs (cone NATs). When to avoid. Symmetric NATs, which assign different external ports per destination — STUN alone can't traverse these. Enterprise firewalls that block UDP entirely. The hard part. STUN servers must be publicly reachable. You need fallback for the ~8-15% of networks where STUN fails.
When to use. Fallback when direct connection is impossible — symmetric NATs, restrictive firewalls, corporate networks. All traffic relays through a TURN server. When to avoid. As a primary strategy — TURN servers are expensive (they relay all traffic) and add latency. Use only when STUN and hole punching fail. Key decisions. TURN server provisioning and cost (bandwidth is proportional to usage), geographic distribution for latency, credential rotation, capacity planning for peak concurrent relayed connections.
…
Design and assess enterprise integration patterns, legacy modernization, and orchestration strategies.
Review system designs with a seven-step method to surface risks and improvements.
Evaluate system designs through Unix/Linux principles for simplicity and composability.
Design or assess Azure system architectures, operations, and cloud service choices.
Design and evaluate data pipelines, streaming systems, and ETL architecture patterns.
Design offline-first edge systems with sync, conflict handling, and weak-network resilience.
Design and evaluate core mechanisms, tradeoffs, and failures in distributed systems.
Design and evaluate real-time collaborative systems, sync flows, and failure handling.
Design or assess SPA architecture across routing, state, performance, and offline support.
Design or evaluate web services, APIs, scalability, and reliability tradeoffs.
Design and evaluate CLI tools and developer SDK architecture and usability.
Design and evaluate event-driven, message-based, and asynchronous system architectures.