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.
How to use this list
Section titled “How to use this list”- Pick a question and set a 45-minute timer.
- Write requirements, a back-of-the-envelope estimate and the API and data model, then draw the high-level design.
- 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.
- Read the references and note what they did differently, and why.
Questions already worked through on this site:
| Question | Case study |
|---|---|
| URL shortener / Pastebin (Bitly) | URL shortener and Pastebin |
| Twitter/X home timeline and search | Twitter timeline |
| Web crawler | Web crawler |
| Personal finance aggregator (Mint) | Personal finance (Mint) |
| Social graph, degrees of separation | Social graph |
| Search query cache | Search query cache |
| Best sellers by category (Amazon) | Sales rank |
| Growing a web app to millions of users | Scaling to millions |
| Chat server (object-oriented design) | Online chat (OOD) |
Storage and data infrastructure
Section titled “Storage and data infrastructure”| Question | Key challenge | On this site | References |
|---|---|---|---|
| Key-value store (Redis, DynamoDB) | Partitioning plus replication with tunable consistency; membership and failure detection | NoSQL, Partitioning, Replication | Dynamo (SOSP 2007), DynamoDB (USENIX ATC 2022) |
| Distributed cache (Memcached) | Hot keys, stampedes on miss, invalidation across regions | Caching layers, Cache strategies | Scaling Memcache at Facebook (NSDI 2013) |
| File sync service (Dropbox, Google Drive) | Chunking and dedup, conflict handling, a client that syncs correctly offline | Object storage, Consistency patterns | Dropbox: rewriting the sync engine, Inside the Magic Pocket |
| Unique ID generator | Roughly time-ordered 64-bit IDs with no central bottleneck; clock skew | URL shortener, Partitioning | Announcing Snowflake, Sharding & IDs at Instagram |
| Serving data from multiple data centers | Consistency vs latency across regions; failover without losing writes | Replication, CAP theorem | Spanner (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 spikes | Consensus and coordination, Queues, Resilience patterns | Reliable Cron across the Planet |
| Metrics and logging pipeline | Ingesting millions of points per second, compression, retention tiers, fast queries | Observability, Event streaming | Gorilla (VLDB 2015), Monarch (VLDB 2020) |
Social and content platforms
Section titled “Social and content platforms”| Question | Key challenge | On this site | References |
|---|---|---|---|
| News feed (Facebook, Instagram) | Fan-out on write vs on read; celebrities; ranking | Twitter timeline, Social graph | Timelines at Scale (QCon 2012), TAO (USENIX ATC 2013) |
| Photo sharing (Instagram) | Upload pipeline, media storage and CDN, feed generation | Object storage, CDN | What Powers Instagram |
| Chat app (WhatsApp, Slack, Discord) | Persistent connections, per-conversation ordering, delivery receipts, offline sync | Online chat (OOD), API styles | Slack: 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 provider | Queues, Rate limiting | Netflix: Rapid Event Notification System |
| Video streaming platform (YouTube, Netflix) | Transcoding pipeline, adaptive bitrate, edge caching of a huge catalogue | CDN, Object storage | Netflix: per-title encoding, Netflix Open Connect |
| Collaborative editor (Google Docs, Figma) | Concurrent edits converge (OT or CRDTs); presence; offline editing | Consistency patterns | How Figma’s multiplayer works, Local-first software |
| Recommendation system (Amazon, YouTube) | Candidate generation then ranking; fresh features; offline training vs online serving | Event streaming, Caching layers | Deep Neural Networks for YouTube Recommendations |
| Content delivery network (Cloudflare, CloudFront) | Request routing to the nearest healthy edge, cache fill, purge | CDN, DNS | Netflix Open Connect |
Search and discovery
Section titled “Search and discovery”| Question | Key challenge | On this site | References |
|---|---|---|---|
| Web search engine (Google) | Crawling, inverted index sharding, ranking, sub-second fan-out queries | Web crawler, Search query cache | The Anatomy of a Large-Scale Hypertextual Web Search Engine |
| Typeahead / autocomplete | Prefix lookup in tens of milliseconds; popularity updates; per-user results | Search query cache, Caching layers | The Life of a Typeahead Query |
| Proximity search (Yelp, nearby friends) | Spatial indexing (geohash, S2, H3) and frequent location updates | Partitioning, NoSQL | S2 Geometry, H3 documentation |
Real-time analytics and counting
Section titled “Real-time analytics and counting”| Question | Key challenge | On this site | References |
|---|---|---|---|
| Trending topics (Twitter/X) | Sliding windows, ranking by growth rather than volume, spam | Sales rank, Event streaming | Real-time trending topics in Storm |
| Top-K requests in a time interval | Heavy hitters in bounded memory; merging partial results | Sales rank | Space-Saving (Metwally et al.), Count-Min Sketch |
| Ad click aggregation | Exactly-once counting, late events, reconciliation for billing | Event streaming | Uber: exactly-once ad event processing |
| API rate limiter | Accurate limits across many servers without adding latency | Rate limiting | Stripe: scaling your API with rate limiters, Cloudflare: rate limiting millions of domains |
Location, marketplaces and money
Section titled “Location, marketplaces and money”| Question | Key challenge | On this site | References |
|---|---|---|---|
| Ride-hailing dispatch (Uber, Lyft) | Matching supply and demand in real time on a constantly moving geo index | Partitioning, Availability patterns | Uber H3 hexagonal index, How Uber scales its real-time market platform |
| Payment system | Never charge twice: idempotency keys, ledgers, reconciliation with external providers | Resilience patterns, Relational databases | Airbnb: avoiding double payments, Stripe: idempotency |
| Stock exchange (NASDAQ, a crypto exchange) | Deterministic, low-latency order matching; sequencing; replay for recovery | Latency vs throughput | The LMAX Architecture |
| Online multiplayer game | Authoritative server, latency hiding (prediction, interpolation), matchmaking | TCP and UDP | Fast-Paced Multiplayer: client-server architecture |
AI-era systems
Section titled “AI-era systems”| Question | Key challenge | On this site | References |
|---|---|---|---|
| LLM chat assistant serving | GPU capacity and batching, KV-cache memory, streaming tokens, per-user token quotas | LLM-powered systems, Rate limiting, Queues | PagedAttention / 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 permissions | LLM-powered systems, Search query cache | RAG (Lewis et al., NeurIPS 2020), HNSW (Malkov and Yashunin) |
What changed since the original list
Section titled “What changed since the original list”- 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.
Further reading
Section titled “Further reading”- Designing Data-Intensive Applications — Martin Kleppmann’s book covers the building blocks behind almost every question on this page.
- Foundational papers — the papers that most of these systems descend from.
- Company architectures — how well-known products are built.
- Engineering blogs — where to follow current practice.
Related topics
Section titled “Related topics”- Interview framework — the seven steps to follow for each question.
- Back-of-the-envelope estimation — the numbers that shape every design.
- Study plan — how many of these questions to practise for your timeline.
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.