Skip to content

More interview questions

The worked case studies in this section cover a handful of classic problems in depth. Interviewers draw from a much wider pool, but most questions reuse the same few dozen building blocks. This page lists the common ones, grouped by theme, with the one challenge that makes each question interesting, the pages on this site that give you the building blocks, and one or two primary sources: papers and engineering posts from the teams that built the real thing.

  1. Pick a question and set a 45-minute timer.
  2. Write requirements, a back-of-the-envelope estimate and the API and data model, then draw the high-level design.
  3. Go deep on the key challenge listed in the table. That is where interviewers push. Then look for bottlenecks and failure modes, and wrap up against the requirements.
  4. Read the references and note what they did differently, and why.

Questions already worked through on this site:

QuestionCase study
URL shortener / Pastebin (Bitly)URL shortener and Pastebin
Twitter/X home timeline and searchTwitter timeline
Web crawlerWeb crawler
Personal finance aggregator (Mint)Personal finance (Mint)
Social graph, degrees of separationSocial graph
Search query cacheSearch query cache
Best sellers by category (Amazon)Sales rank
Growing a web app to millions of usersScaling to millions
Chat server (object-oriented design)Online chat (OOD)
QuestionKey challengeOn this siteReferences
Key-value store (Redis, DynamoDB)Partitioning plus replication with tunable consistency; membership and failure detectionNoSQL, Partitioning, ReplicationDynamo (SOSP 2007), DynamoDB (USENIX ATC 2022)
Distributed cache (Memcached)Hot keys, stampedes on miss, invalidation across regionsCaching layers, Cache strategiesScaling Memcache at Facebook (NSDI 2013)
File sync service (Dropbox, Google Drive)Chunking and dedup, conflict handling, a client that syncs correctly offlineObject storage, Consistency patternsDropbox: rewriting the sync engine, Inside the Magic Pocket
Unique ID generatorRoughly time-ordered 64-bit IDs with no central bottleneck; clock skewURL shortener, PartitioningAnnouncing Snowflake, Sharding & IDs at Instagram
Serving data from multiple data centersConsistency vs latency across regions; failover without losing writesReplication, CAP theoremSpanner (OSDI 2012), Transactions across datacenters
Distributed job scheduler (cron at scale)At-most-once vs at-least-once runs when nodes fail; leader election; avoiding midnight spikesConsensus and coordination, Queues, Resilience patternsReliable Cron across the Planet
Metrics and logging pipelineIngesting millions of points per second, compression, retention tiers, fast queriesObservability, Event streamingGorilla (VLDB 2015), Monarch (VLDB 2020)
QuestionKey challengeOn this siteReferences
News feed (Facebook, Instagram)Fan-out on write vs on read; celebrities; rankingTwitter timeline, Social graphTimelines at Scale (QCon 2012), TAO (USENIX ATC 2013)
Photo sharing (Instagram)Upload pipeline, media storage and CDN, feed generationObject storage, CDNWhat Powers Instagram
Chat app (WhatsApp, Slack, Discord)Persistent connections, per-conversation ordering, delivery receipts, offline syncOnline chat (OOD), API stylesSlack: real-time messaging, Discord: storing trillions of messages
Notification system (push, email, SMS)Fan-out to millions of devices, priorities, dedup, rate limits per user and per providerQueues, Rate limitingNetflix: Rapid Event Notification System
Video streaming platform (YouTube, Netflix)Transcoding pipeline, adaptive bitrate, edge caching of a huge catalogueCDN, Object storageNetflix: per-title encoding, Netflix Open Connect
Collaborative editor (Google Docs, Figma)Concurrent edits converge (OT or CRDTs); presence; offline editingConsistency patternsHow Figma’s multiplayer works, Local-first software
Recommendation system (Amazon, YouTube)Candidate generation then ranking; fresh features; offline training vs online servingEvent streaming, Caching layersDeep Neural Networks for YouTube Recommendations
Content delivery network (Cloudflare, CloudFront)Request routing to the nearest healthy edge, cache fill, purgeCDN, DNSNetflix Open Connect
QuestionKey challengeOn this siteReferences
Web search engine (Google)Crawling, inverted index sharding, ranking, sub-second fan-out queriesWeb crawler, Search query cacheThe Anatomy of a Large-Scale Hypertextual Web Search Engine
Typeahead / autocompletePrefix lookup in tens of milliseconds; popularity updates; per-user resultsSearch query cache, Caching layersThe Life of a Typeahead Query
Proximity search (Yelp, nearby friends)Spatial indexing (geohash, S2, H3) and frequent location updatesPartitioning, NoSQLS2 Geometry, H3 documentation
QuestionKey challengeOn this siteReferences
Trending topics (Twitter/X)Sliding windows, ranking by growth rather than volume, spamSales rank, Event streamingReal-time trending topics in Storm
Top-K requests in a time intervalHeavy hitters in bounded memory; merging partial resultsSales rankSpace-Saving (Metwally et al.), Count-Min Sketch
Ad click aggregationExactly-once counting, late events, reconciliation for billingEvent streamingUber: exactly-once ad event processing
API rate limiterAccurate limits across many servers without adding latencyRate limitingStripe: scaling your API with rate limiters, Cloudflare: rate limiting millions of domains
QuestionKey challengeOn this siteReferences
Ride-hailing dispatch (Uber, Lyft)Matching supply and demand in real time on a constantly moving geo indexPartitioning, Availability patternsUber H3 hexagonal index, How Uber scales its real-time market platform
Payment systemNever charge twice: idempotency keys, ledgers, reconciliation with external providersResilience patterns, Relational databasesAirbnb: avoiding double payments, Stripe: idempotency
Stock exchange (NASDAQ, a crypto exchange)Deterministic, low-latency order matching; sequencing; replay for recoveryLatency vs throughputThe LMAX Architecture
Online multiplayer gameAuthoritative server, latency hiding (prediction, interpolation), matchmakingTCP and UDPFast-Paced Multiplayer: client-server architecture
QuestionKey challengeOn this siteReferences
LLM chat assistant servingGPU capacity and batching, KV-cache memory, streaming tokens, per-user token quotasLLM-powered systems, Rate limiting, QueuesPagedAttention / vLLM (SOSP 2023), Orca (OSDI 2022)
Question answering over company documents (RAG)Chunking and embedding pipeline, vector index recall vs latency, keeping the index fresh, enforcing each user’s document permissionsLLM-powered systems, Search query cacheRAG (Lewis et al., NeurIPS 2020), HNSW (Malkov and Yashunin)
  • Dropped: “design a garbage collector” (a language-runtime question, not system design) and Facebook graph search (the product was wound down long ago; the social graph case study covers the core).
  • Merged: Facebook chat into the general chat app question; Facebook timeline into news feed.
  • Added: notification system, video streaming, ride-hailing dispatch, proximity search, typeahead, distributed job scheduler, payment system, metrics and logging pipeline, ad click aggregation, LLM serving and retrieval-augmented generation (RAG) — all now common in interviews.
  • References replaced: most of the original links (Quora threads, Slideshare decks, old highscalability.com posts) were dead or low quality; this list prefers papers and posts by the teams that built the systems.

Based on The System Design Primer by Donne Martin (CC BY 4.0). Restructured, rewritten and updated; site content is licensed under CC BY 4.0.