System design walkthroughs and deep dives
Each walkthrough builds a design one decision at a time and says why, rather than presenting a finished diagram. Then you practise a similar question and get feedback on what an interviewer would push on.
Walkthroughs
- Design a YouTube view counter: Count billions of views without melting one database row per video — and decide how exact the number needs to be.
- Design WhatsApp "online" and "last seen": Keep presence fresh for hundreds of millions of connections without broadcasting every heartbeat to everyone.
- Design an OTP login system: Six digits are easy to generate — the design is in expiry, attempt limits, delivery retries and not leaking codes.
- Design Spotify "Recently played": A per-user, bounded, de-duplicated list — the data structure choice does most of the work.
- Design Gmail-style Smart Compose: An ML system is a latency budget, a candidate set and a feedback loop — the model is only one box.
Deep dives
- Design Uber's ride matching: Match riders to nearby drivers in under two seconds while a million drivers stream their location — and never book one driver twice.
- Design a distributed rate limiter: Enforce one limit per API key across fifty gateway nodes, add under two milliseconds, and stay up when the limiter itself fails.
- Design Google Docs real-time collaboration: Many people type into the same paragraph at once and everyone ends up with identical text — here is how the ordering actually works.
- Design a Ticketmaster flash sale: A million fans arrive in one minute for fifty thousand seats. Keep it fair, keep it up, and never sell a seat twice.
- Design a news feed at scale: Fan-out on write, fan-out on read, and the celebrity problem that forces you to use both.
- Design a Stripe-style payment system: Money must move exactly once — through retries, timeouts and a card network that sometimes never answers.
- Design Kafka: a distributed log: Why an append-only, partitioned, replicated log beats a queue — and what "exactly once" really costs.
- Design Google-style typeahead: Suggestions within 50 ms of every keystroke — precomputed, cached at the edge, and refreshed without ever blocking a read.
- Design WhatsApp message delivery: Deliver every message exactly once, in order, with ✓ and ✓✓ — even when the recipient's phone is off for a week.
- Design a distributed cache (Memcached/Redis): Consistent hashing, eviction, hot keys and the thundering herd — the four things every cache design is really about.
- Design Netflix video streaming: Encode once into many bitrates, push bytes to the edge before anyone asks, and let the player adapt second by second.
- Design an enterprise RAG system: Answer questions from a company's documents with citations — the hard parts are chunking, retrieval quality and permissions, not the LLM.
- Design LLM inference serving: GPUs are the budget. Batching, KV caches and streaming decide how many users one GPU can serve — and how fast the first token appears.
- Design a URL shortener (Bitly): A classic for a reason: unique short codes at scale, a read path that must never be slow, and analytics that must never slow it down.
- Design push notifications at scale: Send a billion notifications a day through Apple and Google, respect every user's preferences, and never send the same one twice.
- Design Google Drive / Dropbox sync: Sync files across devices by moving only the chunks that changed — and decide what happens when two devices edit the same file offline.
- Design Airbnb search and booking: Search millions of listings by map area, dates and guests in under a second — and make sure two people can never book the same night.
- Design a stock exchange matching engine: Microsecond matching, strict fairness and a perfect audit trail — why the core of an exchange is single-threaded on purpose.
- Design a distributed job scheduler: Run millions of scheduled and dependent jobs on time, exactly once from the user's point of view, with workers that crash all the time.
- Design TikTok's For You feed: A two-stage recommender that picks the next video from millions in under 100 ms — and learns from every swipe.
- Design real-time fraud detection: Score every payment in under 100 ms, combine rules with ML, and keep learning from fraud labels that arrive weeks late.