System Design Case Studies
Each case study applies the interview framework to a canonical system design problem. The format is consistent: clarifying questions, estimation, high-level design with Mermaid diagrams, deep dives on the most interesting components, failure modes, and key takeaways.
These problems cover the most commonly asked designs across Google, Meta, Amazon, Uber, Stripe, and other top companies. Master these and you will recognize the underlying patterns in any new problem you face.
Standalone case studies
Six standalone walkthroughs, each covering a distinct design space:
- URL Shortener, ID generation, base62 encoding, redirect caching, and analytics pipelines
- Social Feed, fanout strategies, hybrid push/pull, ML ranking, and the celebrity problem
- Video Streaming, chunked upload, transcoding pipelines, adaptive bitrate, and CDN strategy
- Chat System, message ordering, WebSocket connection management, exactly-once delivery, and group chat scaling
- Notification System, multi-channel delivery, priority queues, deduplication, and rate limiting per user
- Ride Sharing, geospatial indexing, real-time location at scale, matching, and surge pricing
Progressive series: ten systems, ten layers
This ten-part series builds up a shared vocabulary one entry at a time. Each system introduces new concepts and explicitly reuses patterns from every prior entry. Reading in order, you accumulate a mental toolkit: by entry ten, you can identify the same underlying structure (Kafka pipeline, Redis cache, consistent hashing) across wildly different products.
| # | System | New concepts introduced | Patterns carried forward |
|---|---|---|---|
| 1 | Bitly | Snowflake ID generation, Redis redirect cache, Kafka analytics pipeline | Series foundation |
| 2 | Dropbox | Block deduplication (SHA-256), delta sync, metadata vs block storage | ID generation, Kafka, Redis |
| 3 | Ticketmaster | Distributed locking, flash sale queue, inventory reservation | Redis, Kafka, ID generation |
| 4 | Facebook News Feed | Fan-out on write vs read, celebrity problem, Redis sorted sets | Kafka, Redis, distributed locking |
| 5 | WebSocket fleet, sequence-number ordering, exactly-once delivery, presence | Redis routing table, Kafka, ID generation | |
| 6 | LeetCode | Sandboxed execution, warm container pools, leaderboard sorted sets | Kafka job queue, Redis sorted sets, WebSocket |
| 7 | Uber | Redis GEO, ETA-based matching, stream-based surge pricing | WebSocket routing, Kafka, Redis |
| 8 | Web Crawler | URL frontier, politeness, Bloom filter dedup, SimHash | Kafka URL queue, consistent hashing, Redis |
| 9 | Ad Click Aggregator | Time-windowed aggregation, idempotent counting, lambda architecture | Kafka stream, consistent hashing, Redis counters |
| 10 | Facebook Post Search | Inverted index, BM25 ranking, typeahead, privacy filtering | Kafka indexing pipeline, consistent hashing, Redis cache |
| 11 | eBay | Auction state machine, proxy bidding, bid sniper problem, payment escrow | Distributed locking, Redis sorted sets, WebSocket routing, Kafka, idempotent writes |
The underlying patterns
Most system design problems are variations of a small set of recurring challenges:
| Challenge | Appears in |
|---|---|
| Write fan-out (1 write, N readers) | Social feed, notifications, ride sharing, news feed |
| Exactly-once semantics | Chat, WhatsApp, payments, ad click aggregator |
| Geospatial indexing | Ride sharing, Uber |
| Pipeline processing (ingest, transform, store) | Video streaming, web crawler, post search, ad clicks |
| ID generation at high QPS | Bitly, Dropbox, WhatsApp, LeetCode |
| Real-time communication | Chat, WhatsApp, LeetCode, Uber |
| Distributed locking | Ticketmaster, news feed |
| Bloom filter deduplication | Web crawler |
Recognizing the pattern in a new problem is more valuable than memorizing each design individually.
Related topics
- Interview Framework, the 4-step approach these case studies follow
- Back-of-Envelope Estimation, the numbers behind the estimation sections
- Caching, a key component in every case study
- Message Queues, the async backbone in notifications, streaming, and fan-out
- Consistent Hashing, the sharding primitive used in Bitly, web crawler, and post search