Skip to the chapters

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

How the HLD round works

18 pages
  1. What the HLD round is and what interviewers score Beginner 3 pages
  2. The 45-minute timeline, minute by minute Beginner 3 pages
  3. Mid-level, senior and staff answers to the same question Intermediate 3 pages
  4. How the round differs by company: Google, Meta, Amazon, Microsoft, Apple, Netflix, Uber, Stripe, AI labs, Flipkart and Swiggy Beginner 3 pages
  5. Talking while you draw: the whiteboard, hints and pushback Beginner 3 pages
  6. Red flags: what gets candidates rejected Beginner 3 pages
Chapter 2

The framework

31 pages
  1. The framework: seven steps for every question Beginner 3 pages
  2. Step 1: Clarify the features and cut the scope Beginner 3 pages
  3. Step 2: The non-functional requirements that shape this design Beginner 3 pages
  4. Step 3: Core entities and the API Beginner 3 pages
  5. Step 4: Estimates that change the design (and when to skip them) Intermediate 3 pages
  6. Step 5: The first working design Beginner 3 pages
  7. Step 6: Choosing the deep dives and going deep Intermediate 3 pages
  8. Step 7: Wrapping up: bottlenecks, failures and what you'd do next Intermediate 3 pages
  9. The framework end to end: a pastebin in 35 minutes Beginner 4 pages
  10. Practice: The round and the framework 3 pages
Chapter 3

Patterns: reads, writes and data flow

43 pages
  1. Scaling reads: replicas, caches, CDNs and precomputed views Intermediate 5 pages
  2. Scaling writes: sharding, batching and write buffers Intermediate 5 pages
  3. Fan-out on write vs fan-out on read Intermediate 5 pages
  4. Hot spots: celebrities, viral posts and flash crowds Advanced 5 pages
  5. Counting at scale: likes, views and sharded counters Intermediate 5 pages
  6. Large files: chunked, resumable and direct-to-storage uploads Intermediate 5 pages
  7. Keeping derived data in sync: search indexes, caches and read models Advanced 5 pages
  8. Long-running work: async jobs, status and callbacks Intermediate 5 pages
  9. Practice: Reads, writes and data flow 3 pages
Chapter 4

Patterns: real time and location

38 pages
  1. Real-time delivery to millions of open connections Advanced 5 pages
  2. Presence: who's online Intermediate 5 pages
  3. Ordering, delivery and read receipts in conversations Advanced 5 pages
  4. Tracking moving things: high-rate location updates Intermediate 5 pages
  5. Nearby search: finding what's close Intermediate 5 pages
  6. Matching supply and demand: dispatch and assignment Advanced 5 pages
  7. Real-time collaboration: many people editing one thing Advanced 5 pages
  8. Practice: Real time and location 3 pages
Chapter 5

Patterns: ranking, search and aggregation

28 pages
  1. Top-K and leaderboards Intermediate 5 pages
  2. Real-time aggregation: counting events in time windows Advanced 5 pages
  3. Typeahead: prefix lookup and precomputed suggestions Intermediate 5 pages
  4. Adding search to a product: indexing, sharding and freshness Intermediate 5 pages
  5. Feed ranking basics: candidates, scoring and mixing Intermediate 5 pages
  6. Practice: Ranking, search and aggregation 3 pages
Chapter 6

Patterns: correctness under contention and failure

38 pages
  1. Contention: two people, one seat Advanced 5 pages
  2. Holds that expire, queues and virtual waiting rooms Intermediate 5 pages
  3. Moving money safely: ledgers, idempotency and reconciliation Advanced 5 pages
  4. Multi-step workflows: orchestration, sagas and durable execution Advanced 5 pages
  5. Scheduling work for later: delayed jobs, cron at scale and leases Intermediate 5 pages
  6. Going multi-region: where data lives, who writes it, how users are routed Advanced 5 pages
  7. Degrading gracefully: what to switch off when things break Intermediate 5 pages
  8. Practice: Correctness under contention and failure 3 pages
Chapter 7

Patterns: staff-level moves

23 pages
  1. Evolving a design: from a thousand users to a hundred million Advanced 5 pages
  2. Designing for cost Advanced 5 pages
  3. Changing a live system: migrations, backfills and dual writes Advanced 5 pages
  4. Build vs buy: managed services in the interview Intermediate 5 pages
  5. Practice: Staff-level moves 3 pages
Chapter 8

Product and API design

27 pages
  1. The product architecture round: how it differs Beginner 3 pages
  2. From user flows to endpoints Beginner 3 pages
  3. Feed and list APIs: cursors, infinite scroll and prefetching Intermediate 3 pages
  4. Real-time features in the API: live updates, typing and edits Intermediate 3 pages
  5. Search and filter APIs: query shape, facets and sorting Intermediate 3 pages
  6. The client–server contract: optimistic updates, offline and sync Intermediate 3 pages
  7. Who can see what: privacy, permissions and blocking Intermediate 3 pages
  8. Public APIs for developers: keys, quotas, webhooks and SDKs Intermediate 3 pages
  9. Practice: Product and API design 3 pages
Chapter 9

Case studies: the classics

60 pages
  1. Design a URL shortener (like Bitly) Beginner 12 pages
  2. Design a rate limiter Intermediate 12 pages
  3. Design a notification system Intermediate 12 pages
  4. Design search autocomplete (typeahead) Intermediate 12 pages
  5. Design a web crawler (like Googlebot) Advanced 12 pages
Chapter 10

Case studies: social, messaging and media

108 pages
  1. Design a news feed (like Facebook or X) Intermediate 12 pages
  2. Design a photo-sharing app (like Instagram) Intermediate 12 pages
  3. Design a chat app (like WhatsApp or Messenger) Intermediate 12 pages
  4. Design live comments (like Facebook Live or YouTube Live) Intermediate 12 pages
  5. Design a video streaming service (like YouTube or Netflix) Intermediate 12 pages
  6. Design file storage and sync (like Dropbox or Google Drive) Intermediate 12 pages
  7. Design a collaborative editor (like Google Docs) Advanced 12 pages
  8. Design post search (like searching posts on Facebook or X) Advanced 12 pages
  9. Design top-K and trending (like YouTube's most-viewed or a top-songs chart) Advanced 12 pages
Chapter 11

Case studies: location and marketplaces

48 pages
  1. Design nearby places (like Yelp or Google Maps places) Intermediate 12 pages
  2. Design ride hailing (like Uber) Advanced 12 pages
  3. Design food delivery (like DoorDash, Swiggy or Zomato) Advanced 12 pages
  4. Design maps and ETAs (like Google Maps) Advanced 12 pages
Chapter 12

Case studies: bookings, commerce and money

60 pages
  1. Design ticket booking (like Ticketmaster or BookMyShow) Intermediate 12 pages
  2. Design a flash sale and inventory (like Amazon Prime Day or Flipkart's Big Billion Days) Advanced 12 pages
  3. Design an online auction (like eBay) Intermediate 12 pages
  4. Design a payment system (like Stripe) Advanced 12 pages
  5. Design a stock trading app (like Robinhood) Advanced 12 pages
Chapter 13

Case studies: data and platform

84 pages
  1. Design an ad click aggregator Advanced 12 pages
  2. Design a metrics and monitoring system (like Datadog) Advanced 12 pages
  3. Design a distributed job scheduler Advanced 12 pages
  4. Design a distributed cache Intermediate 12 pages
  5. Design a key-value store (like DynamoDB) Advanced 12 pages
  6. Design a distributed message queue (like Kafka) Advanced 12 pages
  7. Design an online code judge (like LeetCode) Intermediate 12 pages
Chapter 14

Practice problems

47 pages
  1. 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
  2. Problem set: real time and location (fitness tracking like Strava, a live game leaderboard, online chess, friends nearby) 8 pages
  3. Problem set: bookings and commerce (hotel booking like Airbnb, a price tracker, shopping cart and checkout, a digital wallet) 8 pages
  4. Problem set: platform and infrastructure (a unique ID service, object storage like S3, a CDN, software updates to millions of devices) 8 pages
  5. Follow-up drills: when the interviewer changes the requirements 10 pages
  6. Running a mock round: timer, scoring sheet and how to give feedback 5 pages
Chapter 15

Revision

21 pages
  1. The HLD cheat sheet: building blocks, numbers and trade-offs 4 pages
  2. Every case study in five lines 11 pages
  3. Patterns at a glance: which move solves which problem 4 pages
  4. The night before the HLD round 2 pages

More to read

Mobile, Frontend, ML and GenAI system design are being written.