HLD Real Systems
39 real systems across 6 levels, from URL shortener to a distributed message queue — every one answers the same 13-section template.
Each system below is written as the answer to the 13-section HLD template: Requirements → Scale → APIs → Data model → Architecture → Request flow → Bottleneck → Scaling → Failure handling → Consistency → Security → Monitoring → Trade-offs.
Level 1 problems are the essential first pass; Levels 2–3 are classic; Levels 4–5 are the enterprise systems where a 4+ YOE Java engineer actually earns the interview.
Level 1
System 12.1 — URL Shortener
Level 1The perfect first HLD: small data, global scale, one hot read path (redirect) and one rare write path (create).
7 min 1 code practice
System 12.2 — Rate Limiter (HLD)
Level 1The LLD limiter from Phase 4, now distributed: sticky to one instance won't work, so the counters move to Redis.
7 min 1 code practice
System 12.3 — Notification System (HLD)
Level 1Fan-out, channel adapters, templates, batching and the provider-failure story — the LLD from Phase 4 at scale.
7 min 1 diagram practice
System 12.4 — File Storage (HLD)
Level 1Blob storage + metadata DB + edge serving — S3-style, the LLD from Phase 4 at object scale.
7 min 1 diagram practice
System 12.5 — Pastebin
Level 1URL shortener + file storage hybrid: text blobs with read-once/expiry semantics.
7 min 1 diagram practice
Level 2
System 12.6 — Twitter
Level 2The classic read-heavy fan-out problem: write once, read everywhere, and the pull vs push decision for feeds.
7 min 1 code practice
System 12.7 — Instagram (Media Sharing)
Level 2Twitter + a compressed media pipeline: upload, transform (resize/filter), and serve from CDN via signed URLs.
7 min 1 diagram practice
System 12.8 — News Feed
Level 2The read-path emphasis of Twitter: ranking, dedupe, pagination and the per-user inbox model.
7 min 1 diagram practice
System 12.9 — Chat System
Level 2WebSocket gateways, message ordering per conversation, presence, and 'what if the client reconnects'.
7 min 1 diagram practice
System 12.10 — WhatsApp (Chat at Scale)
Level 2Chat system with the billion-user add-ons: media messages, end-to-end encryption, delivery receipts.
7 min 1 diagram practice
Level 3
System 12.11 — YouTube (Video Platform)
Level 3The media pipeline made enormous: upload, transcode variants, adaptive-bitrate streaming over CDN.
7 min 1 diagram practice
System 12.12 — Netflix
Level 3YouTube's streaming + the recommendation/open-connect story: regional caching boxes and ML-driven home.
7 min 1 diagram practice
System 12.13 — Dropbox (Sync Engine)
Level 3The hard part isn't storage — it's reconciliation: chunked sync, delta algorithm, and conflict resolution.
7 min 1 diagram practice
System 12.14 — Google Drive
Level 3Dropbox sync + collaborative docs + org/quotas layer — mostly the same engine with Google Docs on top.
6 min 1 diagram practice
System 12.15 — Uber (Location-based Matching)
Level 3The geospatial problem: driver discovery, live positions, matching, pink dot metaphor — and the map is the app.
7 min 1 code practice
Level 4
System 12.16 — Payment System (HLD)
Level 4The highest-stakes design: money invariants, idempotency, gateway adapters, reconciliation, webhooks.
7 min 1 diagram practice
System 12.17 — E-commerce
Level 4Catalog, cart, checkout, inventory, orders, payments, delivery — the multi-domain orchestration problem.
7 min 1 diagram practice
System 12.18 — Food Delivery (HLD)
Level 4E-commerce + live geo tracking + delivery assignment — the order lifecycle with real-time tail.
7 min 1 diagram practice
System 12.19 — Ticket Booking (HLD)
Level 4BookMyShow at scale: multi-tenancy of venues, seat holds, and why inventory sells out 'evenly'.
7 min 1 diagram practice
System 12.20 — Search Engine
Level 4The one HLD that's genuinely different: crawling, indexing, ranking, and serving billions of queries.
7 min 1 diagram practice
Level 5
System 12.21 — Distributed Logging
Level 5Collecting logs from 10k services into one searchable sink — the ELK/opentelemetry story.
7 min 1 diagram practice
System 12.22 — Metrics / Monitoring
Level 5Prometheus-style: pull model, label-based time series, alerting, and the golden signals.
6 min 1 diagram practice
System 12.23 — Notification Platform
Level 5The notification system (12.3) elevated to a PLATFORM team product: tenants, templates, delivery SLAs, self-service.
6 min 1 diagram practice
System 12.24 — Distributed Job Scheduler
Level 5Cron at fleet scale: at-least-once scheduling, leases, leader election for periodic jobs, and exactly-one-owner semantics.
7 min 1 diagram practice
System 12.25 — API Gateway (HLD)
Level 5The gateway as a product: routing, auth, quotas, rate limiting, observability — scaled and made boring.
7 min 1 diagram practice
System 12.26 — Feature Flag Platform
Level 5Flags as a product: evaluation service with edge caching, targeting rules, audit, and kill switches.
7 min 1 diagram practice
System 12.27 — Workflow Engine
Level 5The saga state machine as a product: durable steps, retries, human tasks, and the event-driven revival.
7 min 1 diagram practice
System 12.28 — Test Execution Platform
Level 5CI test runners as a service: job scheduling, resource pools, parallelism, artifact collection.
7 min 1 diagram practice
System 12.29 — CI/CD Platform
Level 5The delivery pipeline as a product: stages, artifacts, approvals, blue/green and canary deployment.
6 min 1 diagram practice
System 12.30 — Multi-tenant SaaS Platform
Level 5One codebase, many customers: isolation, tenancy models, quotas, billing, and the scaling per tenant.
7 min 1 diagram practice
Level 6
System 12.31 — Typeahead / Search Autocomplete
Level 6Suggest the top completions for every keystroke in under 100 ms: a read-heavy, latency-critical system built on precomputed prefix → top-K lists, fed by an offline aggregation of search logs.
7 min 1 diagram practice
System 12.32 — Web Crawler
Level 6Fetch billions of pages politely and efficiently: a URL frontier with per-host politeness, distributed fetchers, deduplication of URLs and content, and robust parsing, all without hammering any single website.
7 min 1 diagram practice
System 12.33 — Distributed Key-Value Store (Dynamo-style)
Level 6Design a highly available, horizontally scalable `get/put` store: consistent hashing with virtual nodes, replication with tunable quorums, versioning and conflict resolution, hinted handoff, gossip membership, and Merkle-tree repair.
7 min 1 diagram practice
System 12.34 — Proximity Service (Nearby Places / Yelp)
Level 6Find businesses near a location, with filters and ranking. Places change rarely and reads dominate, so a geospatial index (geohash/quadtree) cached per cell serves millions of 'nearby' queries cheaply.
7 min 1 diagram practice
System 12.35 — Collaborative Document Editor (Google Docs)
Level 6Many people typing in the same document at once, seeing each other's changes in real time, even offline. The heart is conflict-free merging of concurrent edits with Operational Transformation or CRDTs over WebSockets.
7 min 1 diagram practice
System 12.36 — Real-Time Leaderboard
Level 6Rank millions of players by score in real time and show anyone's rank and neighbours instantly. Redis sorted sets do the heavy lifting; the design questions are durability, sharding very large boards, and time-windowed boards.
7 min 1 code practice
System 12.37 — Ad Click Aggregation & Top-K Heavy Hitters
Level 6Count billions of ad clicks per day accurately enough to bill advertisers and show live dashboards: stream aggregation with windows and watermarks, exactly-once-ish processing with reconciliation, and top-K ads per minute.
7 min 1 diagram practice
System 12.38 — Hotel Reservation System
Level 6Book rooms without double-booking under concurrency and overbooking policies: inventory per room type per date, strong consistency on the booking path, idempotent reservation requests, and caching for search.
7 min 1 code practice
System 12.39 — Distributed Message Queue (design Kafka)
Level 6Design the log-based queue itself: partitioned append-only logs on disk, leader/follower replication with in-sync replicas, consumer groups with offsets, retention, and the trade-offs behind high throughput.
7 min 1 diagram practice