System design is the hardest part of senior interviews. But you can prepare for it.
Framework (4 Steps)¶
- Requirements — functional and non-functional (scale, latency, availability)
- High-level design — main components and data flow
- Deep dive — details of critical components
- Bottlenecks & trade-offs — scaling, failure scenarios
Key Concepts¶
- Load balancing (L4 vs L7)
- Caching (CDN, Redis, application cache)
- Database (SQL vs NoSQL, sharding, replication)
- Message queues (async processing)
- Consistent hashing
- CAP theorem
- Rate limiting
- API Gateway
Typical Assignments¶
- URL shortener (TinyURL)
- Chat system (WhatsApp/Slack)
- Social media feed (Twitter/Instagram)
- Video streaming (YouTube/Netflix)
- Ride sharing (Uber)
- Search engine
Example: URL Shortener¶
- Requirements: 100M URLs/day, read-heavy (100:1)
- API: POST /shorten, GET /:shortCode → redirect
- Storage: 100M × 1KB = 100 GB/day
- Hash function: base62 encode
- Database: sharded by shortCode
- Cache: Redis for hot URLs
- CDN for redirect
Resources¶
- System Design Primer (GitHub)
- Designing Data-Intensive Applications (book)
- ByteByteGo (YouTube)
- system-design.com
Tip¶
Think out loud, ask about requirements, draw diagrams. The interviewer evaluates your thought process, not a perfect solution.
system designinterviewarchitecture