System Design Skill
A structured playbook for designing scalable, reliable, and maintainable systems.
Work top-down: clarify requirements first, then shape the architecture, then
drill into each component (data, scaling, messaging, caching, API, infra), and
always end by stating the trade-offs you accepted.
When to Use
- Designing a new system or service from scratch
- Preparing for a system design interview or review
- Choosing between databases, caches, or messaging systems
- Planning how a system scales from thousands to millions of users
- Deploying and operating services on AWS / Kubernetes
- Documenting the trade-offs behind an architectural decision
The Workflow
Follow these nine stages in order. Each links to a detailed reference.
flowchart LR
R[1. Requirements] --> A[2. Architecture]
A --> D[3. Database]
A --> S[4. Scaling]
A --> K[5. Kafka]
A --> C[6. Redis]
A --> P[7. API]
A --> I[8. AWS + K8s]
I --> T[9. Trade-offs]
D --> T
S --> T
K --> T
C --> T
P --> T
1. Requirements
Never design before scoping. Separate functional (what it does) from
non-functional (how well it does it), then derive scale numbers.
- Functional: core features, user actions, must-haves vs. nice-to-haves.
- Non-functional: availability, latency, consistency, durability, security.
- Back-of-envelope: QPS, storage/day, bandwidth, read:write ratio.
See Requirements Gathering.
2. Architecture
Sketch the high-level components and how requests flow between them.
- Client → Load Balancer → API/Service layer → Data layer.
- Decide monolith vs. microservices; identify service boundaries.
- Add async paths (queues/streams) where work can be deferred.
See Architecture Patterns.
3. Database
Pick storage per access pattern, not by habit. Often polyglot.
| Need |
Pick |
| Strong consistency, relations |
SQL (Postgres, MySQL) |
| High write throughput, scale |
Wide-column (Cassandra) |
| Flexible documents |
Document (MongoDB, DynamoDB) |
| Key lookups / cache |
Key-value (Redis, DynamoDB) |
| Search / full-text |
Search engine (Elasticsearch) |
See Database Selection & Modeling.
4. Scaling
Scale the bottleneck, not everything. Measure first.
- Vertical (bigger box) vs. horizontal (more boxes).
- Stateless services + load balancing for the app tier.
- Replication for read scaling and HA; sharding/partitioning for write scaling.
- CDN for static/edge content.
See Scaling Strategies.
5. Kafka
Use event streaming to decouple producers from consumers and absorb spikes.
- Topics, partitions (parallelism + ordering), consumer groups.
- Use for: event sourcing, log aggregation, async pipelines, fan-out.
- Delivery semantics: at-least-once by default; idempotent/exactly-once when needed.
See Kafka & Event Streaming.
6. Redis
Add caching to cut latency and offload the database.
- Patterns: cache-aside, write-through, write-behind.
- Also: sessions, rate limiting, leaderboards, distributed locks, pub/sub.
- Mind eviction policies, TTLs, and cache invalidation (the hard part).
See Redis & Caching.
7. API
Design the contract clients depend on. Keep it consistent and versioned.
- REST vs. gRPC vs. GraphQL — match to consumers and latency needs.
- Pagination, idempotency, error model, auth, rate limits, versioning.
See API Design.
8. AWS + Kubernetes
Map the design onto cloud infrastructure and orchestration.
- AWS: ELB/ALB, EC2/EKS/Lambda, RDS/DynamoDB, S3, SQS/MSK, CloudFront.
- Kubernetes: Deployments, Services, Ingress, HPA, ConfigMaps/Secrets, probes.
See AWS Deployment and Kubernetes.
9. Trade-offs
Every choice costs something. State it explicitly.
- CAP: consistency vs. availability under partition.
- Latency vs. consistency, cost vs. performance, simplicity vs. flexibility.
- Document why you chose A over B.
See Trade-offs & Decision Records.
Quick Checklist
Reference Files
1---2name: system-design3description: System design helper for architecting scalable, reliable backend systems. Use when asked to: gather requirements, design an architecture, choose a database, plan for scaling, model events with Kafka, cache with Redis, design an API, deploy on AWS, orchestrate with Kubernetes, or reason about trade-offs. Triggers: "system design", "architecture", "scalability", "scale", "database design", "schema", "Kafka", "event streaming", "Redis", "caching", "API design", "REST", "gRPC", "AWS", "Kubernetes", "k8s", "high availability", "load balancing", "trade-offs", "HLD", "high level design", "design a system like".4---56# System Design Skill78A structured playbook for designing scalable, reliable, and maintainable systems.9Work top-down: clarify **requirements** first, then shape the **architecture**, then10drill into each component (**data, scaling, messaging, caching, API, infra**), and11always end by stating the **trade-offs** you accepted.1213---1415## When to Use1617- Designing a new system or service from scratch18- Preparing for a system design interview or review19- Choosing between databases, caches, or messaging systems20- Planning how a system scales from thousands to millions of users21- Deploying and operating services on AWS / Kubernetes22- Documenting the trade-offs behind an architectural decision2324---2526## The Workflow2728Follow these nine stages in order. Each links to a detailed reference.2930```mermaid31flowchart LR32 R[1. Requirements] --> A[2. Architecture]33 A --> D[3. Database]34 A --> S[4. Scaling]35 A --> K[5. Kafka]36 A --> C[6. Redis]37 A --> P[7. API]38 A --> I[8. AWS + K8s]39 I --> T[9. Trade-offs]40 D --> T41 S --> T42 K --> T43 C --> T44 P --> T45```4647---4849### 1. Requirements5051Never design before scoping. Separate **functional** (what it does) from52**non-functional** (how well it does it), then derive scale numbers.5354- **Functional:** core features, user actions, must-haves vs. nice-to-haves.55- **Non-functional:** availability, latency, consistency, durability, security.56- **Back-of-envelope:** QPS, storage/day, bandwidth, read:write ratio.5758See [Requirements Gathering](./references/requirements.md).5960---6162### 2. Architecture6364Sketch the high-level components and how requests flow between them.6566- Client → Load Balancer → API/Service layer → Data layer.67- Decide monolith vs. microservices; identify service boundaries.68- Add async paths (queues/streams) where work can be deferred.6970See [Architecture Patterns](./references/architecture.md).7172---7374### 3. Database7576Pick storage per access pattern, not by habit. Often **polyglot**.7778| Need | Pick |79|-------------------------------|-------------------------------|80| Strong consistency, relations | SQL (Postgres, MySQL) |81| High write throughput, scale | Wide-column (Cassandra) |82| Flexible documents | Document (MongoDB, DynamoDB) |83| Key lookups / cache | Key-value (Redis, DynamoDB) |84| Search / full-text | Search engine (Elasticsearch) |8586See [Database Selection & Modeling](./references/database.md).8788---8990### 4. Scaling9192Scale the bottleneck, not everything. Measure first.9394- **Vertical** (bigger box) vs. **horizontal** (more boxes).95- Stateless services + load balancing for the app tier.96- **Replication** for read scaling and HA; **sharding/partitioning** for write scaling.97- CDN for static/edge content.9899See [Scaling Strategies](./references/scaling.md).100101---102103### 5. Kafka104105Use event streaming to decouple producers from consumers and absorb spikes.106107- Topics, partitions (parallelism + ordering), consumer groups.108- Use for: event sourcing, log aggregation, async pipelines, fan-out.109- Delivery semantics: at-least-once by default; idempotent/exactly-once when needed.110111See [Kafka & Event Streaming](./references/kafka.md).112113---114115### 6. Redis116117Add caching to cut latency and offload the database.118119- Patterns: cache-aside, write-through, write-behind.120- Also: sessions, rate limiting, leaderboards, distributed locks, pub/sub.121- Mind eviction policies, TTLs, and cache invalidation (the hard part).122123See [Redis & Caching](./references/redis.md).124125---126127### 7. API128129Design the contract clients depend on. Keep it consistent and versioned.130131- REST vs. gRPC vs. GraphQL — match to consumers and latency needs.132- Pagination, idempotency, error model, auth, rate limits, versioning.133134See [API Design](./references/api.md).135136---137138### 8. AWS + Kubernetes139140Map the design onto cloud infrastructure and orchestration.141142- **AWS:** ELB/ALB, EC2/EKS/Lambda, RDS/DynamoDB, S3, SQS/MSK, CloudFront.143- **Kubernetes:** Deployments, Services, Ingress, HPA, ConfigMaps/Secrets, probes.144145See [AWS Deployment](./references/aws.md) and [Kubernetes](./references/kubernetes.md).146147---148149### 9. Trade-offs150151Every choice costs something. State it explicitly.152153- CAP: consistency vs. availability under partition.154- Latency vs. consistency, cost vs. performance, simplicity vs. flexibility.155- Document *why* you chose A over B.156157See [Trade-offs & Decision Records](./references/trade-offs.md).158159---160161## Quick Checklist162163- [ ] Functional + non-functional requirements written down164- [ ] Scale estimated (QPS, storage, read:write ratio)165- [ ] High-level diagram with clear component boundaries166- [ ] Database chosen per access pattern (+ schema sketch)167- [ ] Scaling plan: replication / sharding / caching / LB168- [ ] Async paths identified (Kafka/queues) where useful169- [ ] Caching strategy + invalidation defined (Redis)170- [ ] API contract: versioning, errors, auth, pagination171- [ ] Deployment target mapped (AWS services + K8s objects)172- [ ] Trade-offs and bottlenecks explicitly stated173174---175176## Reference Files177178- [Requirements Gathering](./references/requirements.md)179- [Architecture Patterns](./references/architecture.md)180- [Database Selection & Modeling](./references/database.md)181- [Scaling Strategies](./references/scaling.md)182- [Kafka & Event Streaming](./references/kafka.md)183- [Redis & Caching](./references/redis.md)184- [API Design](./references/api.md)185- [AWS Deployment](./references/aws.md)186- [Kubernetes](./references/kubernetes.md)187- [Trade-offs & Decision Records](./references/trade-offs.md)