一键导入
system-design
Master system design with architecture patterns, component design, scalability planning, and creating robust, maintainable systems.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Master system design with architecture patterns, component design, scalability planning, and creating robust, maintainable systems.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Master business documentation including BRD, FRD, specifications, and technical documentation for clear communication and requirements management.
Master process modeling with BPMN, flowcharts, swimlane diagrams, and process optimization techniques for business process improvement.
Master requirements gathering techniques including interviews, workshops, observation, and documentation for effective requirement elicitation.
Master use case development with actors, scenarios, preconditions, postconditions, and detailed specifications for comprehensive requirements.
Master data visualization with chart selection, dashboard design, Tableau, Power BI, and effective data storytelling.
Master Excel for data analysis with pivot tables, formulas, Power Query, and advanced Excel techniques.
| name | system-design |
| description | Master system design with architecture patterns, component design, scalability planning, and creating robust, maintainable systems. |
Design robust, scalable systems using proven architecture patterns and best practices for enterprise applications.
## Level 1: System Context
[Users] → [E-Commerce System] → [Payment Gateway]
↓
[Email Service]
## Level 2: Container Diagram
E-Commerce System:
- Web Application (React, Node.js)
- API Server (Node.js, Express)
- Database (PostgreSQL)
- Cache (Redis)
- Message Queue (RabbitMQ)
- Search Engine (Elasticsearch)
## Level 3: Component Diagram (API Server)
API Server:
- Authentication Service
- Product Catalog Service
- Order Management Service
- Payment Service
- Notification Service
## Level 4: Code (Authentication Service)
Classes:
- AuthController
- AuthService
- TokenManager
- UserRepository
## System Capacity Planning
**Requirements:**
- 1M active users
- Peak: 10K concurrent users
- 100K transactions/day
- 3 second max response time
- 99.9% uptime
**Calculations:**
**Traffic:**
- Requests/sec (peak): 10K users × 10 req/min / 60 = 1,667 RPS
- Database queries: 1,667 × 3 avg queries = 5,000 QPS
- Storage/day: 100K × 5KB avg = 500MB/day
- Storage/year: 500MB × 365 = 180GB
**Server Capacity:**
- App servers: 1,667 RPS / 200 RPS per server = 9 servers
- With redundancy (3x): 27 servers
- Database: Master-replica setup, read replicas for queries
**Network:**
- Bandwidth: 1,667 req × 50KB avg = 83MB/s = 664 Mbps
- CDN for static assets
**Costs (AWS estimate):**
- EC2 (27 × c5.xlarge): $3,500/month
- RDS (db.r5.2xlarge): $1,200/month
- Load Balancer: $200/month
- CloudFront CDN: $500/month
- Total: ~$5,400/month
## Architecture Decision: Monolith vs Microservices
**Monolith:**
✅ Pros:
- Simpler deployment
- Easier local development
- Single codebase
- Simpler testing
- Lower operational overhead
❌ Cons:
- Scaling all-or-nothing
- Technology lock-in
- Longer deployment cycles
- Harder to maintain at scale
**Microservices:**
✅ Pros:
- Independent scaling
- Technology flexibility
- Team autonomy
- Fault isolation
- Faster deployments
❌ Cons:
- Complex infrastructure
- Distributed system challenges
- Network latency
- Data consistency
- Higher operational overhead
**Decision:** Start with modular monolith, extract microservices as needed
**Rationale:** Team size (5 devs), early stage, faster time-to-market