The System Design Framework: How to Approach Any Problem
The 4-Step Framework
Step 1: REQUIREMENTS (5 min)
• Clarify functional requirements (what does it do?)
• Clarify non-functional requirements (scale, latency, availability)
• Identify constraints and assumptions
Step 2: ESTIMATION (5 min)
• QPS (reads and writes)
• Storage (per day, per year)
• Bandwidth
• Number of servers needed
Step 3: HIGH-LEVEL DESIGN (15 min)
• Draw the architecture (clients, LB, services, DB, cache)
• Identify core components and data flow
• Choose database type, communication pattern
Step 4: DEEP DIVE (15 min)
• Dive into 2-3 interesting components
• Discuss trade-offs and alternatives
• Address failure scenarios
• Discuss scaling bottlenecks
Common Building Blocks
| Need | Reach For |
|---|---|
| Handle many requests | Load balancer + horizontal scaling |
| Fast reads | Cache (Redis) + CDN |
| Fast writes | Message queue (Kafka) + async processing |
| Search | Elasticsearch |
| Real-time | WebSocket + pub/sub |
| Large files | Object storage (S3) + CDN |
| Unique IDs | Snowflake / ULID |
| Consistency | Single leader DB + synchronous replication |
| Availability | Multi-region + eventual consistency |
Trade-off Discussions to Always Mention
- Consistency vs Availability (CAP)
- Latency vs Throughput
- Push vs Pull (fan-out on write vs read)
- SQL vs NoSQL
- Sync vs Async communication
- Simplicity vs Scalability
What You've Learned in This Guide
🎓 Congratulations!
You now have a complete mental toolkit for system design:
- Requirements gathering and estimation
- Networking, APIs, and communication patterns
- Scaling (vertical, horizontal, caching, sharding)
- Data storage (SQL, NoSQL, queues, object storage)
- Reliability (availability, fault tolerance, rate limiting)
- Distributed systems (consensus, transactions, event sourcing)
- Infrastructure (CDN, search, monitoring, service discovery)
- Security (auth, encryption, secrets)
- Real-world design exercises
Practice by designing systems you use daily: how would you build Spotify? Uber? Your company's internal tools? Apply the framework, draw diagrams, identify trade-offs.