From systems-architecture
Designs scalable distributed systems using structured approaches for load balancing, caching, database scaling, and message queues. Useful for system design interviews and capacity planning.
How this skill is triggered — by the user, by Claude, or both
Slash command
/systems-architecture:system-designThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
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.
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.
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.
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.
Six areas for building reliable, scalable distributed systems:
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:
Code applications:
| Context | Pattern | Example |
|---|---|---|
| New service kickoff | One-page design doc covering all four steps before coding | Requirements, API contract, data model, capacity estimate, then implementation |
| Architecture review | Walk reviewers through the steps sequentially | Scope, diagram, deep-dive on riskiest component, open questions |
| Incident postmortem | Trace the failure through the four-step lens | Which 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.
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:
Code applications:
| Context | Pattern | Example |
|---|---|---|
| Capacity planning | Estimate QPS, multiply by growth factor | 100M DAU x 5 actions / 86400 = ~5,800 QPS avg, ~30K peak |
| Storage budgeting | Per-record size x volume x retention | 500M tweets/day x 300 bytes x 365 days = ~55 TB/year |
| SLA definition | Convert nines to allowed downtime | Four 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.
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:
Code applications:
| Context | Pattern | Example |
|---|---|---|
| Read-heavy workload | Cache-aside Redis in front of database | Cache user profiles with TTL; invalidate on write |
| Traffic spikes | Message queue between API and workers | Enqueue image-resize jobs; workers pull at their own pace |
| Global users | CDN for static assets | Serve JS/CSS/images from edge; origin serves only API |
| Uneven load | Consistent hashing for shard assignment | Adding 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.
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:
Code applications:
| Context | Pattern | Example |
|---|---|---|
| Read-heavy API | Leader-follower with read replicas | Reads to replicas, writes to leader; accept slight lag |
| User data at scale | Hash-based sharding on user_id | hash(user_id) % num_shards; even, independent shards |
| Analytics dashboard | Denormalized materialized views | Pre-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.
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:
Code applications:
| Context | Pattern | Example |
|---|---|---|
| Short link service | Base62-encode auto-increment ID or hash | https://short.ly/a1B2c3 maps to a key-value row |
| API protection | Token bucket at gateway | 100 tokens/min per key; steady refill; reject with 429 |
| Social feed | Hybrid fanout | Precompute 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.
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:
Code applications:
| Context | Pattern | Example |
|---|---|---|
| Zero-downtime deploy | Blue-green with health check gates | Switch to green after checks pass; keep blue as instant rollback |
| Gradual rollout | Canary with metric comparison | 5% traffic to new version; compare errors and latency; promote or rollback |
| Data safety | Define RPO/RTO, implement accordingly | RPO 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.
| Mistake | Why It Fails | Fix |
|---|---|---|
| Architecture before requirements | Solves the wrong problem, misses constraints | Spend the first 5-10 minutes on scope: features, scale, SLA |
| No estimation | Provisioning off by orders of magnitude | Estimate QPS, storage, bandwidth before choosing components |
| Single point of failure | One component takes down the system | Redundancy at every layer: multi-server, multi-AZ, multi-region |
| Premature sharding | Huge operational complexity before it's needed | Vertical first, read replicas, cache aggressively, shard last |
| Caching without invalidation | Stale data causes bugs and confusion | Define TTL; cache-aside with explicit invalidation on writes |
| Synchronous calls everywhere | One slow service cascades latency to all callers | Queues for non-latency-critical paths; timeouts on sync calls |
| Ignoring hotspots | One shard or key hammered, others idle | Detect hot keys; add secondary partitioning or local caches |
| No monitoring or alerting | Users find failures before you do | Instrument metrics, logs, and traces from day one |
| Question | If No | Action |
|---|---|---|
| Are functional and non-functional requirements listed? | Design rests on assumptions | Write down features, DAU, QPS, storage, latency and availability SLAs |
| Is there a QPS and storage estimate? | Capacity is a guess | DAU x actions / 86400 for QPS; records x size x retention for storage |
| Is every component redundant? | Single points of failure | Add replicas, failover, or multi-AZ per component |
| Is the database scaling strategy defined? | You hit a wall under growth | Vertical first, then read replicas, then sharding with a clear shard key |
| Is there a cache for read-heavy paths? | Database takes unnecessary load | Redis/Memcached cache-aside with defined TTL |
| Are async paths using queues? | Tight coupling, cascading failures | Decouple with Kafka/SQS for jobs, notifications, analytics |
| Is there a monitoring and alerting plan? | Blind to production failures | Define metrics, log aggregation, tracing, alert thresholds |
| Is the deployment strategy defined? | Risky all-at-once releases | Rolling, blue-green, or canary with automated rollback |
For the complete guides with detailed diagrams and walkthroughs:
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.
npx claudepluginhub wondelai/skills --plugin systems-architectureGuides distributed systems design with 4-step framework. CHECKER audits designs for gaps and anti-patterns; APPLIER interactively builds systems step-by-step. Covers 15 designs like rate limiters, KV stores, news feeds.
Provides system design interview frameworks: RESHADED structure, capacity estimation, building blocks (caching, sharding, etc.), tradeoffs, and anti-patterns.
Structures a complete system design answer for interview questions or real architecture sessions. Covers requirements, capacity estimates, high-level design, component deep-dives, trade-offs, and follow-up considerations.