Skip to content

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.

#SystemNew concepts introducedPatterns carried forward
1BitlySnowflake ID generation, Redis redirect cache, Kafka analytics pipelineSeries foundation
2DropboxBlock deduplication (SHA-256), delta sync, metadata vs block storageID generation, Kafka, Redis
3TicketmasterDistributed locking, flash sale queue, inventory reservationRedis, Kafka, ID generation
4Facebook News FeedFan-out on write vs read, celebrity problem, Redis sorted setsKafka, Redis, distributed locking
5WhatsAppWebSocket fleet, sequence-number ordering, exactly-once delivery, presenceRedis routing table, Kafka, ID generation
6LeetCodeSandboxed execution, warm container pools, leaderboard sorted setsKafka job queue, Redis sorted sets, WebSocket
7UberRedis GEO, ETA-based matching, stream-based surge pricingWebSocket routing, Kafka, Redis
8Web CrawlerURL frontier, politeness, Bloom filter dedup, SimHashKafka URL queue, consistent hashing, Redis
9Ad Click AggregatorTime-windowed aggregation, idempotent counting, lambda architectureKafka stream, consistent hashing, Redis counters
10Facebook Post SearchInverted index, BM25 ranking, typeahead, privacy filteringKafka indexing pipeline, consistent hashing, Redis cache
11eBayAuction state machine, proxy bidding, bid sniper problem, payment escrowDistributed 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:

ChallengeAppears in
Write fan-out (1 write, N readers)Social feed, notifications, ride sharing, news feed
Exactly-once semanticsChat, WhatsApp, payments, ad click aggregator
Geospatial indexingRide sharing, Uber
Pipeline processing (ingest, transform, store)Video streaming, web crawler, post search, ad clicks
ID generation at high QPSBitly, Dropbox, WhatsApp, LeetCode
Real-time communicationChat, WhatsApp, LeetCode, Uber
Distributed lockingTicketmaster, news feed
Bloom filter deduplicationWeb crawler

Recognizing the pattern in a new problem is more valuable than memorizing each design individually.