MCP HubMCP Hub
SKILL·4002E7

system-design

wondelai
업데이트됨 15 days ago
5 조회
2,020
206
2,020
GitHub에서 보기
디자인aidesigndata

정보

이 스킬은 확장 가능한 분산 시스템 설계를 위한 구조화된 프레임워크를 제공하며, 로드 밸런싱, 캐싱, 데이터베이스 확장과 같은 요구사항을 다룹니다. 시스템 설계 인터뷰, 애플리케이션 확장, 또는 URL 단축기나 소셜 피드와 같은 특정 서비스 설계를 논의할 때 활성화됩니다. 백오브더뎀 계산을 위한 실용적인 구성 요소를 포함하며, 일반적인 아키텍처 패턴을 다룹니다.

빠른 설치

Claude Code

추천
기본
npx skills add wondelai/skills -a claude-code
플러그인 명령대체
/plugin add https://github.com/wondelai/skills
Git 클론대체
git clone https://github.com/wondelai/skills.git ~/.claude/skills/system-design

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

System Design Framework

A structured approach to designing large-scale distributed systems. Apply these principles when architecting new services, reviewing designs, estimating capacity, or preparing for system design discussions.

Core Principle

Start with requirements, not solutions. Jumping to architecture before understanding constraints produces over- or under-engineered systems. Scalable systems are assembled from well-understood building blocks (load balancers, caches, queues, databases, CDNs) — the skill lies in choosing the right blocks, sizing them with estimates, and owning the tradeoffs each choice introduces.

Scoring

Goal: 10/10. Score a design by how many of the eight Quick Diagnostic rows it satisfies — score = round(passed / 8 × 10): 9-10 = all/nearly all rows pass — explicit requirements, real estimates, redundancy, a stated DB-scaling and caching strategy, async via queues, monitoring, and a deployment plan, with tradeoffs named; 5-6 = the design works but skips estimation, redundancy, or operations; <=3 = architecture proposed before requirements or estimates exist. Always state the current score, name the failing diagnostic rows, and give the specific fix for each.

The System Design Framework

Six areas for building reliable, scalable distributed systems:

1. The Four-Step Process

Core concept: Every design follows four stages: (1) understand the problem and establish scope, (2) propose a high-level design and get buy-in, (3) dive deep into critical components, (4) wrap up with tradeoffs and future improvements.

Why it works: Without structure, designs either stay too abstract or get lost in premature detail. The four steps invest time proportionally — broad strokes first, depth where it matters.

Key insights:

  • Step 1 (~5-10 min): clarifying questions, functional and non-functional requirements, agreed scale (DAU, QPS, storage)
  • Step 2 (~15-20 min): high-level diagram with APIs, services, data stores, data flow arrows
  • Step 3 (~15-20 min): design the 2-3 hardest or most critical components in detail
  • Step 4 (~5 min): tradeoffs, bottlenecks, future improvements
  • Never skip Step 1 — ambiguous scope wastes all downstream effort; get explicit agreement on assumptions

Code applications:

ContextPatternExample
New service kickoffOne-page design doc covering all four steps before codingRequirements, API contract, data model, capacity estimate, then implementation
Architecture reviewWalk reviewers through the steps sequentiallyScope, diagram, deep-dive on riskiest component, open questions
Incident postmortemTrace the failure through the four-step lensWhich requirement was missed? Which block failed? What tradeoff bit us?

See references/four-step-process.md when running a design end-to-end — per-stage time allocation, example clarifying questions, and tips for each of the four steps.

2. Back-of-the-Envelope Estimation

Core concept: Use powers of two, latency numbers, and simple arithmetic to estimate QPS, storage, bandwidth, and server count before committing to an architecture.

Why it works: Estimation prevents over-provisioning (wasted money) and under-provisioning (outages under load). A 2-minute calculation can save weeks of rework.

Key insights:

  • Powers of two: 2^10 ≈ 1 thousand, 2^20 ≈ 1 million, 2^30 ≈ 1 billion, 2^40 ≈ 1 trillion
  • Latency: memory read ~100 ns, SSD read ~100 us, disk seek ~10 ms, same-datacenter round trip ~0.5 ms, cross-continent ~150 ms
  • Availability nines: 99.9% = 8.77 hours downtime/year; 99.99% = 52.6 minutes/year
  • QPS: DAU x actions-per-day / 86,400 seconds; peak is typically 2-5x average
  • Storage: records-per-day x record-size x retention
  • Round aggressively — the goal is order of magnitude, not precision

Code applications:

ContextPatternExample
Capacity planningEstimate QPS, multiply by growth factor100M DAU x 5 actions / 86400 = ~5,800 QPS avg, ~30K peak
Storage budgetingPer-record size x volume x retention500M tweets/day x 300 bytes x 365 days = ~55 TB/year
SLA definitionConvert nines to allowed downtimeFour nines = ~52 minutes downtime per year

See references/estimation-numbers.md when sizing a system — full latency table, availability-nines table, and worked QPS/storage/bandwidth calculations.

3. Building Blocks

Core concept: Scalable systems are assembled from a standard toolkit: DNS, CDN, load balancers, reverse proxies, application servers, caches, message queues, and consistent hashing.

Why it works: Each block trades one cost for another (a cache trades freshness for read speed; a queue trades latency for decoupling), so introduce a block only once its specific bottleneck appears — adding all of them up front just multiplies failure modes.

Key insights:

  • Load balancers: L4 (transport layer — fast, simple) vs L7 (application layer — content-aware routing)
  • Cache layers: client, CDN, web server, application (Redis/Memcached), database query cache
  • Cache strategies: cache-aside (app manages), read-through, write-through (synchronous), write-behind (asynchronous)
  • Message queues (Kafka, RabbitMQ, SQS): decouple producers from consumers, absorb spikes, enable async processing
  • Consistent hashing: distributes keys across nodes with minimal redistribution when nodes change

Code applications:

ContextPatternExample
Read-heavy workloadCache-aside Redis in front of databaseCache user profiles with TTL; invalidate on write
Traffic spikesMessage queue between API and workersEnqueue image-resize jobs; workers pull at their own pace
Global usersCDN for static assetsServe JS/CSS/images from edge; origin serves only API
Uneven loadConsistent hashing for shard assignmentAdding a node moves only ~1/n keys

See references/building-blocks.md when choosing components — how each of DNS, CDN, load balancers, caching strategies, message queues, and consistent hashing works and when to introduce it.

4. Database Design and Scaling

Core concept: Choose SQL vs NoSQL based on data shape and access patterns; scale vertically first, then horizontally (replication and sharding) when vertical limits are reached.

Why it works: The database is usually the first bottleneck. Understanding replication, sharding, and denormalization tradeoffs delays expensive re-architectures and makes growth deliberate.

Key insights:

  • Vertical scaling is simpler but has a ceiling; horizontal is harder but nearly unlimited
  • Replication: leader-follower (one writer, many readers) for read-heavy; multi-leader for multi-region writes
  • Sharding: hash-based (even distribution, hard range queries), range-based (easy ranges, hotspot risk), directory-based (flexible, extra lookup)
  • SQL for ACID transactions, joins, defined schema; NoSQL for flexible schema, horizontal scale, very high write throughput
  • Denormalization trades storage and write complexity for read speed — use when reads dominate and data changes rarely
  • Celebrity/hotspot problem: one hot shard needs secondary partitioning or a cache layer

Code applications:

ContextPatternExample
Read-heavy APILeader-follower with read replicasReads to replicas, writes to leader; accept slight lag
User data at scaleHash-based sharding on user_idhash(user_id) % num_shards; even, independent shards
Analytics dashboardDenormalized materialized viewsPre-join and aggregate nightly; serve from materialized table

See references/database-scaling.md when the database is the bottleneck — replication topologies, the three sharding strategies compared, denormalization tradeoffs, and a SQL-vs-NoSQL selection guide.

5. Common System Designs

Core concept: Most systems are variations of a small set of well-known designs: URL shortener, rate limiter, notification system, news feed, chat, search autocomplete, web crawler, unique ID generator.

Why it works: A mental library of known designs lets you recognize which pattern a new problem resembles and adapt it, rather than inventing from scratch.

Key insights:

  • URL shortener: base62 encoding, key-value store, 301 vs 302 redirect tradeoff (caching vs analytics)
  • Rate limiter: token bucket or sliding window at the gateway; return 429 with Retry-After
  • News feed: fanout-on-write (push at post time) vs fanout-on-read (pull at read time); hybrid for celebrities
  • Chat: WebSocket for real-time bidirectional messages, queue for delivery guarantees, heartbeat presence service
  • Autocomplete: trie of top-k frequent queries; precompute and cache popular prefixes
  • Web crawler: BFS with URL frontier, politeness (robots.txt, per-domain rate limit), dedup via content hash
  • Unique IDs: UUID (simple, no coordination) vs Snowflake (64-bit, time-sortable, datacenter-aware)

Code applications:

ContextPatternExample
Short link serviceBase62-encode auto-increment ID or hashhttps://short.ly/a1B2c3 maps to a key-value row
API protectionToken bucket at gateway100 tokens/min per key; steady refill; reject with 429
Social feedHybrid fanoutPrecompute feeds for <10K-follower accounts; merge celebrity posts at read time

See references/common-designs.md when a problem resembles a known design — full walkthroughs of URL shortener, rate limiter, news feed, chat, autocomplete, web crawler, and unique ID generator.

6. Reliability and Operations

Core concept: A system is only as good as its ability to stay up, recover, and be observed. Health checks, monitoring, logging, and deployment strategies are first-class design concerns, not afterthoughts.

Why it works: Production systems fail in ways diagrams never predict. Operational readiness — metrics, alerts, rollback plans, redundancy — determines whether a failure is a blip or an outage.

Key insights:

  • Health checks: liveness (is the process alive?) and readiness (can it serve traffic?) — Kubernetes uses both
  • Three pillars of observability: metrics (Prometheus, Datadog), logging (ELK, CloudWatch), tracing (Jaeger, Zipkin)
  • Deployments: rolling (gradual), blue-green (instant switch between identical environments), canary (small percentage first)
  • Disaster recovery: RPO (acceptable data loss) and RTO (acceptable recovery time) drive backup and failover strategy
  • Multi-datacenter: active-passive (failover) or active-active (requires data sync and conflict resolution)
  • Autoscaling: scale on CPU, memory, queue depth, or custom metrics; always set min and max counts

Code applications:

ContextPatternExample
Zero-downtime deployBlue-green with health check gatesSwitch to green after checks pass; keep blue as instant rollback
Gradual rolloutCanary with metric comparison5% traffic to new version; compare errors and latency; promote or rollback
Data safetyDefine RPO/RTO, implement accordinglyRPO 1 hour = hourly backups; RTO 5 min = automated failover

See references/reliability-operations.md when hardening for production — health-check patterns, the observability pillars, deployment strategies, disaster-recovery (RPO/RTO), and autoscaling.

Common Mistakes

MistakeWhy It FailsFix
Architecture before requirementsSolves the wrong problem, misses constraintsSpend the first 5-10 minutes on scope: features, scale, SLA
No estimationProvisioning off by orders of magnitudeEstimate QPS, storage, bandwidth before choosing components
Single point of failureOne component takes down the systemRedundancy at every layer: multi-server, multi-AZ, multi-region
Premature shardingHuge operational complexity before it's neededVertical first, read replicas, cache aggressively, shard last
Caching without invalidationStale data causes bugs and confusionDefine TTL; cache-aside with explicit invalidation on writes
Synchronous calls everywhereOne slow service cascades latency to all callersQueues for non-latency-critical paths; timeouts on sync calls
Ignoring hotspotsOne shard or key hammered, others idleDetect hot keys; add secondary partitioning or local caches
No monitoring or alertingUsers find failures before you doInstrument metrics, logs, and traces from day one

Quick Diagnostic

QuestionIf NoAction
Are functional and non-functional requirements listed?Design rests on assumptionsWrite down features, DAU, QPS, storage, latency and availability SLAs
Is there a QPS and storage estimate?Capacity is a guessDAU x actions / 86400 for QPS; records x size x retention for storage
Is every component redundant?Single points of failureAdd replicas, failover, or multi-AZ per component
Is the database scaling strategy defined?You hit a wall under growthVertical first, then read replicas, then sharding with a clear shard key
Is there a cache for read-heavy paths?Database takes unnecessary loadRedis/Memcached cache-aside with defined TTL
Are async paths using queues?Tight coupling, cascading failuresDecouple with Kafka/SQS for jobs, notifications, analytics
Is there a monitoring and alerting plan?Blind to production failuresDefine metrics, log aggregation, tracing, alert thresholds
Is the deployment strategy defined?Risky all-at-once releasesRolling, blue-green, or canary with automated rollback

Further Reading

For the complete guides with detailed diagrams and walkthroughs:

About the Author

Alex Xu is a software engineer who previously worked at Twitter, Apple, and Oracle, and the creator of ByteByteGo. His two-volume System Design Interview series, with over 500,000 copies sold, turned system design into a learnable, repeatable skill through structured thinking, estimation, and clear communication.

GitHub 저장소

wondelai/skills
경로: plugins/systems-architecture/skills/system-design
0
agent-skillsai-skillsbusinessclaude-codeclaude-code-marketplaceclaude-code-plugin
FAQ

자주 묻는 질문

system-design Skill이란 무엇인가요?

system-design은(는) wondelai이(가) 만든 Claude Skill입니다. Skill은 Claude가 필요할 때 불러오는 지침과 리소스를 묶어 추가 프롬프트 없이 system-design 관련 작업을 수행할 수 있게 합니다.

system-design은(는) 어떻게 설치하나요?

이 페이지의 설치 명령을 사용하세요. system-design을(를) Claude Code 플러그인으로 추가하거나 저장소를 skills 디렉터리에 복제한 다음 Claude를 다시 시작해 Skill을 불러옵니다.

system-design은(는) 어떤 카테고리에 속하나요?

system-design은(는) 디자인 카테고리에 속합니다.

system-design은(는) 무료로 사용할 수 있나요?

네. system-design은(는) AIMCP에 등록되어 있으며 무료로 설치할 수 있습니다.

연관 스킬

executing-plans
디자인

executing-plans 스킬은 검토 체크포인트가 포함된 통제된 배치로 실행할 완전한 구현 계획이 있을 때 사용합니다. 이 스킬은 계획을 불러와 비판적으로 검토한 후, 소규모 배치(기본값 3개 작업)로 작업을 실행하면서 각 배치 사이에 진행 상황을 아키텍트 검토를 위해 보고합니다. 이를 통해 내재된 품질 관리 체크포인트를 갖춘 체계적인 구현이 보장됩니다.

스킬 보기
requesting-code-review
디자인

이 스킬은 코드 변경 사항을 요구 사항에 따라 분석하기 위해 코드 리뷰어 하위 에이전트를 호출합니다. 작업 완료 후, 주요 기능 구현 후, 또는 메인 브랜치에 병합하기 전에 사용해야 합니다. 이 리뷰는 현재 구현체와 원래 계획을 비교하여 문제를 조기에 발견하는 데 도움이 됩니다.

스킬 보기
connect-mcp-server
디자인

이 스킬은 개발자들이 HTTP, stdio 또는 SSE 전송 방식을 통해 MCP 서버를 Claude Code에 연결하는 포괄적인 가이드를 제공합니다. GitHub, Notion 및 사용자 정의 API와 같은 외부 서비스를 통합하기 위한 설치, 구성, 인증 및 보안을 다룹니다. MCP 통합 설정, 외부 도구 구성 또는 Claude의 모델 컨텍스트 프로토콜 작업 시 활용하세요.

스킬 보기
web-cli-teleport
디자인

이 스킬은 작업 분석을 기반으로 개발자가 Claude Code 웹 인터페이스와 CLI 인터페이스 중 선택할 수 있도록 돕고, 두 환경 간 원활한 세션 텔레포트를 가능하게 합니다. 웹, CLI 또는 모바일 환경 전환 시 세션 상태와 컨텍스트를 관리하여 워크플로를 최적화합니다. 다양한 단계에서 서로 다른 도구가 필요한 복잡한 프로젝트에 사용하세요.

스킬 보기