Classic HLD Case Studies
Practise the most asked designs: URL shortener, rate limiter, chat app, news feed, notification system, file storage, video streaming and ride hailing.
Advanced · about 16 hours · difficulty 4/5
Learn first: The HLD Interview Framework
Each classic case study exercises a different set of building blocks. Work through them in roughly this order, since later ones reuse ideas from earlier ones.
The list and the key idea in each
- URL shortener (TinyURL): ID generation (base62 encoding, counters vs hashing), a read-heavy workload served from cache, and redirects with 301 vs 302.
- Distributed rate limiter: token bucket in Redis with atomic operations, per-user vs global limits, and behaviour when Redis is down.
- Chat application (WhatsApp): persistent WebSocket connections, message ordering per conversation, delivery and read receipts, offline storage, and a presence service.
- News feed (Instagram, Twitter): fan-out on write vs fan-out on read, the celebrity problem, and a hybrid approach with feed caches.
- Notification system: queues per channel (push, SMS, email), retries, user preferences, templates and rate limiting.
- File storage (Google Drive, Dropbox): chunking, deduplication with hashes, metadata DB vs blob storage, and sync conflicts.
- Video streaming (YouTube, Netflix): upload pipeline with transcoding workers, adaptive bitrate streaming, and heavy use of CDNs.
- Ride hailing (Uber, Ola): location updates at high write rates, geospatial indexing (geohash or quadtrees) for nearby drivers, and matching.
- Also useful: typeahead search (tries plus caching), a web crawler, a distributed key-value store, and a ticket booking system at scale.
How to study them
- Attempt the design yourself first with the framework, then read a reference and list every idea you missed.
- Keep a one-page cheat sheet per design: requirements, estimates, diagram, two deep dives.
- Re-do three of them a week later from memory.
Good enough to move on: you can present any five of these end to end in 45 minutes each and explain the central trade-off of each design in two sentences.
Key concepts
- URL shortener
- Distributed rate limiter
- Chat application
- News feed and fan-out
- Notification system
- File storage and sync
- Video streaming
- Ride hailing and geospatial indexing
- Typeahead search
- Web crawler
Mini project
Build a working mini URL shortener with base62 IDs, a PostgreSQL store, Redis caching and click analytics pushed through a queue, deploy it on a free tier, load test it, and write a design doc that shows how it would scale to 100 million URLs.
Check yourself
In a news feed, why does pure fan-out on write break for celebrity accounts, and what hybrid approach fixes it?
Free resources
- The System Design Primer: System design interview questions with solutions (GitHub)
- ByteByteGo System Design 101 (ByteByteGo)
- High Scalability blog (High Scalability)