High-level design (HLD)
How the round runs and a framework to follow, then patterns and 30 full mock interviews, from a URL shortener to payments.
94 topics · 30 mock interviews · 15 chapters
Start reading
The start of every guide is free, with no sign-up.
Chapter 1
18 pagesHow the HLD round works
- What the HLD round is and what interviewers score Beginner 3 pages
- The 45-minute timeline, minute by minute Beginner 3 pages
- Mid-level, senior and staff answers to the same question Intermediate 3 pages
- How the round differs by company: Google, Meta, Amazon, Microsoft, Apple, Netflix, Uber, Stripe, AI labs, Flipkart and Swiggy Beginner 3 pages
- Talking while you draw: the whiteboard, hints and pushback Beginner 3 pages
- Red flags: what gets candidates rejected Beginner 3 pages
Chapter 2
31 pagesThe framework
- The framework: seven steps for every question Beginner 3 pages
- Step 1: Clarify the features and cut the scope Beginner 3 pages
- Step 2: The non-functional requirements that shape this design Beginner 3 pages
- Step 3: Core entities and the API Beginner 3 pages
- Step 4: Estimates that change the design (and when to skip them) Intermediate 3 pages
- Step 5: The first working design Beginner 3 pages
- Step 6: Choosing the deep dives and going deep Intermediate 3 pages
- Step 7: Wrapping up: bottlenecks, failures and what you'd do next Intermediate 3 pages
- The framework end to end: a pastebin in 35 minutes Beginner 4 pages
- Practice: The round and the framework 3 pages
Chapter 3
43 pagesPatterns: reads, writes and data flow
- Scaling reads: replicas, caches, CDNs and precomputed views Intermediate 5 pages
- Scaling writes: sharding, batching and write buffers Intermediate 5 pages
- Fan-out on write vs fan-out on read Intermediate 5 pages
- Hot spots: celebrities, viral posts and flash crowds Advanced 5 pages
- Counting at scale: likes, views and sharded counters Intermediate 5 pages
- Large files: chunked, resumable and direct-to-storage uploads Intermediate 5 pages
- Keeping derived data in sync: search indexes, caches and read models Advanced 5 pages
- Long-running work: async jobs, status and callbacks Intermediate 5 pages
- Practice: Reads, writes and data flow 3 pages
Chapter 4
38 pagesPatterns: real time and location
- Real-time delivery to millions of open connections Advanced 5 pages
- Presence: who's online Intermediate 5 pages
- Ordering, delivery and read receipts in conversations Advanced 5 pages
- Tracking moving things: high-rate location updates Intermediate 5 pages
- Nearby search: finding what's close Intermediate 5 pages
- Matching supply and demand: dispatch and assignment Advanced 5 pages
- Real-time collaboration: many people editing one thing Advanced 5 pages
- Practice: Real time and location 3 pages
Chapter 5
28 pagesPatterns: ranking, search and aggregation
- Top-K and leaderboards Intermediate 5 pages
- Real-time aggregation: counting events in time windows Advanced 5 pages
- Typeahead: prefix lookup and precomputed suggestions Intermediate 5 pages
- Adding search to a product: indexing, sharding and freshness Intermediate 5 pages
- Feed ranking basics: candidates, scoring and mixing Intermediate 5 pages
- Practice: Ranking, search and aggregation 3 pages
Chapter 6
38 pagesPatterns: correctness under contention and failure
- Contention: two people, one seat Advanced 5 pages
- Holds that expire, queues and virtual waiting rooms Intermediate 5 pages
- Moving money safely: ledgers, idempotency and reconciliation Advanced 5 pages
- Multi-step workflows: orchestration, sagas and durable execution Advanced 5 pages
- Scheduling work for later: delayed jobs, cron at scale and leases Intermediate 5 pages
- Going multi-region: where data lives, who writes it, how users are routed Advanced 5 pages
- Degrading gracefully: what to switch off when things break Intermediate 5 pages
- Practice: Correctness under contention and failure 3 pages
Chapter 7
23 pagesPatterns: staff-level moves
Chapter 8
27 pagesProduct and API design
- The product architecture round: how it differs Beginner 3 pages
- From user flows to endpoints Beginner 3 pages
- Feed and list APIs: cursors, infinite scroll and prefetching Intermediate 3 pages
- Real-time features in the API: live updates, typing and edits Intermediate 3 pages
- Search and filter APIs: query shape, facets and sorting Intermediate 3 pages
- The client–server contract: optimistic updates, offline and sync Intermediate 3 pages
- Who can see what: privacy, permissions and blocking Intermediate 3 pages
- Public APIs for developers: keys, quotas, webhooks and SDKs Intermediate 3 pages
- Practice: Product and API design 3 pages
Chapter 9
60 pagesCase studies: the classics
Chapter 10
108 pagesCase studies: social, messaging and media
- Design a news feed (like Facebook or X) Intermediate 12 pages
- Design a photo-sharing app (like Instagram) Intermediate 12 pages
- Design a chat app (like WhatsApp or Messenger) Intermediate 12 pages
- Design live comments (like Facebook Live or YouTube Live) Intermediate 12 pages
- Design a video streaming service (like YouTube or Netflix) Intermediate 12 pages
- Design file storage and sync (like Dropbox or Google Drive) Intermediate 12 pages
- Design a collaborative editor (like Google Docs) Advanced 12 pages
- Design post search (like searching posts on Facebook or X) Advanced 12 pages
- Design top-K and trending (like YouTube's most-viewed or a top-songs chart) Advanced 12 pages
Chapter 11
48 pagesCase studies: location and marketplaces
Chapter 12
60 pagesCase studies: bookings, commerce and money
- Design ticket booking (like Ticketmaster or BookMyShow) Intermediate 12 pages
- Design a flash sale and inventory (like Amazon Prime Day or Flipkart's Big Billion Days) Advanced 12 pages
- Design an online auction (like eBay) Intermediate 12 pages
- Design a payment system (like Stripe) Advanced 12 pages
- Design a stock trading app (like Robinhood) Advanced 12 pages
Chapter 13
84 pagesCase studies: data and platform
- Design an ad click aggregator Advanced 12 pages
- Design a metrics and monitoring system (like Datadog) Advanced 12 pages
- Design a distributed job scheduler Advanced 12 pages
- Design a distributed cache Intermediate 12 pages
- Design a key-value store (like DynamoDB) Advanced 12 pages
- Design a distributed message queue (like Kafka) Advanced 12 pages
- Design an online code judge (like LeetCode) Intermediate 12 pages
Chapter 14
47 pagesPractice problems
- Problem set: social and content (dating app like Tinder, voting and comments like Reddit, music streaming like Spotify, news aggregator like Google News) 8 pages
- Problem set: real time and location (fitness tracking like Strava, a live game leaderboard, online chess, friends nearby) 8 pages
- Problem set: bookings and commerce (hotel booking like Airbnb, a price tracker, shopping cart and checkout, a digital wallet) 8 pages
- Problem set: platform and infrastructure (a unique ID service, object storage like S3, a CDN, software updates to millions of devices) 8 pages
- Follow-up drills: when the interviewer changes the requirements 10 pages
- Running a mock round: timer, scoring sheet and how to give feedback 5 pages
Chapter 15
21 pagesRevision
More to read
Mobile, Frontend, ML and GenAI system design are being written.