system-design

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

Updated Sep 2, 2026
One-click install
npx skills add https://github.com/prateekgupta3991/skills --skill system-design-prateekgupta3991
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: system-design
Source: https://github.com/prateekgupta3991/skills/tree/main/public/system-design
Command: npx skills add https://github.com/prateekgupta3991/skills --skill system-design-prateekgupta3991

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Designing distributed systems without a structured process leads to over-engineering, missed capacity requirements, and architectures that fail under real load. This Skill provides a repeatable framework for requirements gathering, back-of-the-envelope estimation, component selection, database scaling, and operational readiness. ## Core Features & Use Cases - Four-Step Design Process: Structured workflow covering scope clarification, high-level design, deep dives on critical components, and tradeoff analysis. - Capacity Estimation: Formulas and reference numbers for QPS, storage, bandwidth, and server count calculations using powers of two and latency tables. - Building Blocks & Database Scaling: Guidance on load balancers, caching strategies, message queues, consistent hashing, replication, and sharding. - Use Case: When asked to design a URL shortener for 100M DAU, walk through requirements, estimate ~5,800 read QPS and ~11 TB of 10-year storage, then propose a base62-encoded key-value architecture with cache-aside Redis. ## Quick Start Ask the agent 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 at scale?

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 per 100M DAU.

When should I choose SQL vs NoSQL for a system?

Choose SQL when you need ACID transactions, complex joins, and a stable schema. Choose NoSQL for flexible schemas, horizontal write scaling, or simple key lookups, matching the model (key-value, document, wide-column, graph) to your access pattern.

When should I shard a database instead of scaling vertically?

Shard only after exhausting vertical scaling, read replicas, caching, and query optimization. Sharding adds major operational complexity, so it is justified mainly for write-heavy workloads or data too large for one server.

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

Fanout-on-write pre-computes feeds at post time for fast reads but is expensive for celebrity accounts. Fanout-on-read assembles feeds at read time, keeping writes cheap but reads slow; 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 results can be off by 2-10x. Common mistakes include ignoring peak traffic multipliers, media storage, replication overhead, and future growth rates.