A comprehensive collection of system design case studies covering the most common and challenging interview questions in the tech industry. Each design includes detailed architecture diagrams, component breakdowns, scalability considerations, and trade-offs.
This playbook covers 8 major system designs that frequently appear in FAANG, Meta, Google, Amazon, Microsoft, and other top tech company interviews:
-
YouTube/Netflix - Video Streaming π₯
- Video transcoding, adaptive bitrate streaming, CDN, global distribution
- 15+ sections covering architecture, scalability, and cost optimization
-
Uber - Ride-Sharing Platform π
- Real-time matching, geospatial queries, location tracking, surge pricing
- Focus on real-time systems and matching algorithms
-
- Timeline generation (fan-out vs pull), feed algorithms, scalability
- Hybrid approach for handling celebrities
-
- Hash generation, caching strategies, high read-to-write ratios
- Multiple algorithm comparisons
-
WhatsApp - Messaging System π¬
- Real-time messaging, WebSocket, offline queues, end-to-end encryption
- Distributed message persistence
-
Rate Limiter - API Gateway π‘οΈ
- Token bucket, sliding window, distributed rate limiting
- Low-latency design with Redis
-
Google Docs - Collaborative Editor π
- Operational Transformation (OT), CRDTs, real-time sync
- Conflict resolution and offline support
-
Distributed Key-Value Store ποΈ
- DynamoDB/Cassandra style, consistent hashing, LSM trees
- CAP theorem, tunable consistency, replication
-
How ChatGPT Works π€
- Transformer architecture, tokenization, attention mechanisms
- Training pipeline, fine-tuning, inference optimization
- π’ Easy: 30-40 minutes
- π‘ Medium: 30-45 minutes
- π΄ Hard: 45-60 minutes
- "Design YouTube/Netflix"
- "Design Uber/Ola/Lyft"
- "Design Twitter/Facebook News Feed"
- "Design a URL shortener"
- "Design WhatsApp/Telegram/Messenger"
- "Design a rate limiter"
- "Design Google Docs/Notion/Figma"
- "Design a distributed key-value store (like DynamoDB/Cassandra)"
- "Design a web crawler"
- "Design a cache (like Redis)"
- "Design a payment system (like Stripe/PayPal)"
- "Design an e-commerce platform (like Amazon/Flipkart)"
- "Design a hotel booking system (like Oyo/Booking.com)"
- "Design a food delivery app (like Swiggy/Zomato)"
- "Design Netflix/YouTube video streaming"
- "Design Uber/Ola ride-sharing"
- "Design Twitter social media feed"
- "Design WhatsApp messenger"
- "Design Google Docs real-time collaboration"
- "Design a distributed key-value store"
- "Design a rate limiter"
- "Design a URL shortener"
- "Design a notification system"
- "Design a search autocomplete system"
- "Design a distributed cache"
- "Design a logging system"
- "Design a metrics monitoring system"
- "Design a task queue (like Celery)"
- "Design a file storage system (like Dropbox/Google Drive)"
- "Design ChatGPT/LLM architecture"
- "How does ChatGPT work internally"
- Read the design thoroughly - Understand all components and their interactions
- Draw the architecture - Practice sketching the diagrams from memory
- Deep dive into trade-offs - Be prepared to explain why you chose X over Y
- Practice scalability questions - "What if traffic increases 10x?"
- Learn the algorithms - Understand OT vs CRDT, consistent hashing, token bucket, etc.
- Use these designs as reference for evaluating candidate responses
- Check if candidate covers: requirements, capacity estimation, core components, scalability, fault tolerance
- Look for awareness of trade-offs and alternatives
Each design includes:
- β Requirements (Functional & Non-functional)
- β Capacity Estimation (Back-of-envelope calculations)
- β System Architecture (High-level diagram)
- β Component Deep Dive (Detailed explanations)
- β Database Schema (SQL/NoSQL design)
- β Scalability Considerations (How to scale to millions/billions)
- β Advanced Features (Nice-to-haves)
- β Fault Tolerance (How system handles failures)
- β Monitoring & Alerting (Observability)
- β Security Considerations
- β Trade-offs Table (Key decisions and their implications)
- β Future Enhancements (What to build next)
- β References (Further reading)
All designs follow these principles:
- Start with Requirements - Clarify functional and non-functional requirements
- Capacity Estimation - Back-of-envelope calculations to size the system
- High-Level Architecture - Component diagram with clear boundaries
- Deep Dives - Detailed explanations of critical components
- Data Modeling - Database schema with indexes
- Scalability - How to scale horizontally
- Fault Tolerance - Handle node/region failures
- Trade-offs - Every design decision has pros/cons
You'll see these patterns across multiple designs:
- Caching: Redis/Memcached for hot data
- Message Queues: Kafka/RabbitMQ for async processing
- CDN: CloudFront/Cloudflare for static assets
- Load Balancing: Round-robin, consistent hashing
- Database Partitioning: Sharding by user_id or key hash
- Replication: Master-slave, multi-master
- Consistency Models: Strong, eventual, quorum-based
- Rate Limiting: Token bucket, sliding window
| Algorithm | Use Case | Trade-offs |
|---|---|---|
| Consistent Hashing | Partitioning/distribution | Load balancing, minimal movement on changes |
| Token Bucket | Rate limiting | Allows burst, simple |
| Sliding Window Log | Accurate rate limiting | Memory intensive |
| LSM Tree | Write-heavy storage | Read amplification, compaction overhead |
| Bloom Filter | Fast negative lookups | False positives, no false negatives |
| Merkle Tree | Efficient data synchronization | Tree maintenance overhead |
| Operational Transformation | Real-time collaborative editing | Central coordinator needed |
| CRDTs | Decentralized collaboration | Metadata overhead |
Before diving into these designs, ensure you understand:
- Networking: HTTP/HTTPS, TCP/IP, DNS, CDNs, Load Balancers
- Databases: SQL vs NoSQL, indexing, partitioning, replication
- Caching: Redis, cache invalidation strategies
- Message Queues: Kafka, RabbitMQ, pub/sub patterns
- Distributed Systems: CAP theorem, consensus (Paxos/Raft), gossip protocols
- Cloud Services: AWS/GCP/Azure offerings (S3, EC2, CloudFront, etc.)
-
Clone this repository
git clone https://github.com/BASILAHAMED/System-Design-Playbook.git
-
Pick a design - Start with something familiar (like URL shortener) before tackling harder ones (video streaming, distributed databases)
-
Practice explaining - Try to explain the design to a friend or record yourself
-
Draw diagrams - Use tools like Excalidraw, Lucidchart, or even pen & paper
-
Identify weaknesses - Think about what could fail and how you'd improve it
| System | Write-heavy | Read-heavy | Real-time | Consistency | Scalability |
|---|---|---|---|---|---|
| Video Streaming | Medium | Very High | Medium | Eventual | Very High |
| Ride-Sharing | High | High | Very High | Strong | High |
| Social Media | Very High | Very High | High | Eventual | Very High |
| URL Shortener | Low | Very High | Low | Strong | Very High |
| Messaging | Very High | Very High | Very High | Strong | Very High |
| Rate Limiter | High | High | High | Eventual | Very High |
| Collaborative Editor | Very High | Very High | Very High | Strong | Medium |
| Key-Value Store | Very High | Very High | High | Tunable | Very High |
| ChatGPT/LLM | Medium | High | High | Strong | Very High |
This playbook is actively maintained. Contributions welcome!
Found a bug? Have a suggestion?
- Open an issue: https://github.com/BASILAHAMED/System-Design-Playbook/issues
- Submit a PR with improvements
- Designing Data-Intensive Applications by Martin Kleppmann (Bible of system design)
- System Design Interview by Alex Xu (Vol 1 & 2)
- Designing Distributed Systems by Brendan Burns
- High Scalability - Real-world architecture case studies
- AWS Architecture Blog
- Netflix Tech Blog
- Uber Engineering
- Google Research
MIT License - feel free to use, share, and modify.
Inspired by countless system design interviews, engineering blogs, and the open-source community. Special thanks to all the engineers who've shared their knowledge online.
Happy designing! May your interviews be smooth and your architectures scalable. π
Last updated: March 2026