system-design

Design scalable distributed systems using structured estimation, building blocks, and scaling strategies.

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/HafidJoss/Lummy --skill system-design-hafidjoss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: system-design
Source: https://github.com/HafidJoss/Lummy/tree/main/agent/skills/system-design
Command: npx skills add https://github.com/HafidJoss/Lummy --skill system-design-hafidjoss

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Designing distributed systems without a structured process leads to over-engineered or under-provisioned architectures, missed capacity requirements, and single points of failure. This Skill provides a repeatable framework for requirements gathering, capacity estimation, component selection, and reliability planning. ## Core Features & Use Cases - Four-Step Design Process: Structure any design session from requirements clarification through high-level design, deep dives, and tradeoff analysis. - Back-of-the-Envelope Estimation: Calculate QPS, storage, bandwidth, and server counts using powers of two, latency numbers, and availability nines. - Building Blocks & Database Scaling: Apply load balancers, caches, message queues, consistent hashing, replication, and sharding with clear tradeoff guidance. - Use Case: When asked to design a URL shortener for 100M DAU, walk through requirements, estimate ~5,800 read QPS and ~1.1 TB/year storage, then propose a base62-encoded key-value design with cache-aside Redis. ## Quick Start Ask the AI to design a rate limiter for a public API handling 10,000 requests per second and explain the tradeoffs.

Frequently Asked Questions about system-design

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

FAQPage Schema
How do I estimate QPS and storage for a system design?

Estimate average QPS as DAU multiplied by actions per user divided by 86,400 seconds, then multiply by 2-5x for peak. Storage equals records per day times record size times retention period, rounded to order of magnitude.

How do I design a URL shortener for millions of users?

Use base62-encoded auto-increment IDs stored in a key-value store, with cache-aside Redis for hot URLs. Choose 302 redirects for analytics or 301 for maximum caching performance, and estimate roughly 116 write QPS and 5,800 read QPS at 100M DAU.

When should I choose SQL vs NoSQL for a system design?

Choose SQL when you need ACID transactions, complex joins, and a stable schema. Choose NoSQL for flexible schemas, simple key lookups at massive scale, or very high write throughput such as time-series data in wide-column stores.

When should I shard a database instead of scaling vertically?

Shard only after exhausting vertical scaling, read replicas, caching, and query optimization. Sharding fits write-heavy workloads or datasets too large for one server, using hash-based, range-based, or directory-based strategies with a high-cardinality shard key.

What is the difference between fanout-on-write and fanout-on-read for news feeds?

Fanout-on-write pre-computes feeds at post time, giving fast reads but expensive writes for celebrity accounts. Fanout-on-read assembles feeds at read time, giving cheap writes but slow reads. A hybrid approach pushes for normal users and pulls for celebrities.

What are the limitations of back-of-the-envelope estimation?

Estimation targets order of magnitude, not precision, so it cannot replace load testing or real traffic measurement. Common mistakes include ignoring peak factors, media storage, replication overhead, and future growth rates.