System Designs
Full end-to-end designs of real-world products — YouTube, Uber, Twitter, ChatGPT, and more. Each writeup walks through the 7-step framework with one product as the worked example.
These are the long-form designs an interviewer might ask you to whiteboard in 45 minutes. The writeups are deliberately verbose so they double as study material — but in an actual interview you'd cover roughly the same ground in 25 minutes, leaving 20 for the interviewer's drill-down questions.
Every system page uses the 7-step walk-through with consistent sub-headings, so once you've read 2-3, you can scan a new one and immediately find the trade-off section that matters to your interview.
Key concepts
- Always state your assumptions about scale before designing — every design is wrong at the wrong scale
- Most real systems are 'mostly cache' with a slow path behind it — the cache architecture often determines the whole shape
- Read paths and write paths frequently need different architectures; CQRS is sometimes the answer, often the question
- Geographic distribution is the single biggest constraint that newcomers underweight — adding multi-region doubles complexity
- Whichever component you can't sketch on the whiteboard, the interviewer will drill into. Practice the boring ones.
Reference template
// The 7-step walk-through, system-flavored
## Step 1 — Clarify Requirements
## Step 2 — Capacity Estimation
## Step 3 — System Interface
## Step 4 — High-Level Design
## Step 5 — Data Model
## Step 6 — Detailed Design
## Step 7 — Evaluation & Trade-offs
## Companies this resembles
## Related systems Adapt to your problem; the structure is the load-bearing part.
Common pitfalls
- Designing for hypothetical edge cases before the happy path is robust — interviewer wants to see solid fundamentals first
- Skipping the data model — schema and partitioning key choices determine half the bottlenecks
- Optimizing for the wrong axis — read-heavy and write-heavy systems have opposite shapes
- Forgetting cold-start, deploy, and failure scenarios — interviewers love asking 'what happens at 3am when the cache is empty?'
Related topics
Items (25)
- URL Shortener
Map long URLs to short ones, redirect in O(1), survive billions of clicks. The canonical first system to whiteboard — sharp scope, real scale, every primitive in play.
System Foundational - Twitter Newsfeed
Generate a personalized timeline at read time, write time, or both. The pull / push / hybrid trade-off and the celebrity-fanout problem.
System Intermediate - YouTube
Video upload, encoding pipeline, CDN-backed delivery, watch-history, recommendations.
System Advanced - TikTok
Short-form video at hyperscale. The for-you ranking pipeline is the design — recommendation, signal collection, and freshness vs personalization trade-offs.
System Advanced - Instagram
Photo upload, feed generation, story expiration, following graph.
System Intermediate - WhatsApp
End-to-end-encrypted messaging at scale: presence, delivery receipts, group chats, media.
System Intermediate - Facebook Messenger
Real-time messaging with rich threads, reactions, typing indicators, and read receipts. WhatsApp's cousin with web-first reach and a different presence model.
System Intermediate - Uber
Driver / rider matching, real-time location, surge pricing, payments, fraud detection.
System Advanced - Google Maps
Map tiles, routing on a road graph, ETA prediction, real-time traffic ingestion.
System Advanced - Proximity Service (Yelp)
Geo-indexing, dynamic segments, search-within-radius queries at city scale.
System Intermediate - Quora
Q&A platform: ranking answers, follow graph, notification fan-out, search.
System Intermediate - Generic Newsfeed System
Pluggable feed engine: ranking, freshness, deduplication, infinite scroll, caching strategy.
System Intermediate - Typeahead Suggestion
Real-time prefix matching: trie indexes, ranking, server-side throttling, personalization.
System Intermediate - Web Crawler
URL frontier, politeness, deduplication, content extraction, crawl traps, index updates.
System Advanced - Google Docs (Collaborative Editing)
Operational transforms vs CRDTs, presence, conflict resolution, offline edits.
System Advanced - Code Deployment System
Pipelines, artifact stores, environment promotion, canary / blue-green / rolling, rollback.
System Intermediate - Payment System
Idempotency, double-entry ledgers, reconciliation, gateway integration, fraud signals.
System Advanced - ChatGPT-style Conversational System
Streaming inference, KV-cache reuse, request routing, safety filters, multi-tenant GPU scheduling.
System Advanced - AI / ML Data Infrastructure
Feature stores, training data pipelines, online vs batch features, lineage, vector storage.
System Advanced - LLM-Powered Customer Support Bot
RAG over knowledge bases, conversation memory, escalation handoff, guardrails.
System Intermediate - AI-Powered Code Assistant
Latency-sensitive completion, repo-aware context, indexing strategies, evaluation harness.
System Advanced - Food Delivery (Uber Eats)
Three-sided marketplace: restaurants, couriers, customers. Order routing, ETA, courier dispatch.
System Advanced - Dropbox (File Sync)
Client-side chunked replication, conflict resolution across devices, delta sync, and the LAN sync trick. Canonical 'consumer cloud storage' design.
System Advanced - Ticketmaster (Flash Sale)
Inventory reservation under coordinated burst load: waiting rooms, holds, atomic seat allocation, and the bot-vs-fan arms race.
System Advanced - Spotify Wrapped (Batch Analytics)
Annual per-user retrospective from a year of plays. Massively-parallel batch pipeline, per-user partitioning, and the once-a-year cost shape.
System Intermediate