Unit 8: High-level design questions
Practise the classic HLD questions with the full framework: requirements, estimates, API, data model, design, deep dives and trade-offs.
The big picture
Each question reuses the core concepts. URL shortener is caching and IDs; chat is real-time connections and partitioning; news feed is fan-out; payments are transactions and idempotency. Try each one yourself for 30 minutes before reading the notes.
Lessons in this unit
- Design a URL shortener (like bit.ly): Turn long URLs into short links, like bit.ly/x7Kp2a, that redirect to the original.
- Design a distributed rate limiter: A service that limits how many requests each client can make, enforced consistently across many API servers.
- Design a notification system: Send notifications (mobile push, SMS, email) to users reliably, at large scale.
- Design a chat app (like WhatsApp): One-to-one and group messaging, with delivery receipts and online status.
- Design a news feed (like Twitter or Instagram): Show each user a feed of recent posts from the people they follow.
- Design a video streaming platform (like YouTube or Netflix): Upload, process and stream videos to millions of viewers.
- Design a ride-hailing app (like Uber): Match riders with nearby drivers in real time, track trips and charge fares.
- Design a payment system: Process payments reliably: charge customers, record every money movement, and never lose money or charge twice.
- Design search autocomplete: Suggest the top completions as the user types into a search box.
- Design a real-time leaderboard: Show live rankings of players by score, including each player's own rank.
- Design a distributed cache: A shared in-memory key-value cache, like Redis or Memcached, spread across many machines.