Command Palette

Search for a command to run...

Roadmap
Phase 12Advanced15 of 19 in the curriculum

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.

0/39 · 0%
39 topics ~4 h 39 code blocks & diagrams
Start with the first topic

Level 1

Level 2

Level 3

Level 4

Level 5

21

System 12.21 — Distributed Logging

Level 5

Collecting logs from 10k services into one searchable sink — the ELK/opentelemetry story.

7 min 1 diagram practice

22

System 12.22 — Metrics / Monitoring

Level 5

Prometheus-style: pull model, label-based time series, alerting, and the golden signals.

6 min 1 diagram practice

23

System 12.23 — Notification Platform

Level 5

The notification system (12.3) elevated to a PLATFORM team product: tenants, templates, delivery SLAs, self-service.

6 min 1 diagram practice

24

System 12.24 — Distributed Job Scheduler

Level 5

Cron at fleet scale: at-least-once scheduling, leases, leader election for periodic jobs, and exactly-one-owner semantics.

7 min 1 diagram practice

25

System 12.25 — API Gateway (HLD)

Level 5

The gateway as a product: routing, auth, quotas, rate limiting, observability — scaled and made boring.

7 min 1 diagram practice

26

System 12.26 — Feature Flag Platform

Level 5

Flags as a product: evaluation service with edge caching, targeting rules, audit, and kill switches.

7 min 1 diagram practice

27

System 12.27 — Workflow Engine

Level 5

The saga state machine as a product: durable steps, retries, human tasks, and the event-driven revival.

7 min 1 diagram practice

28

System 12.28 — Test Execution Platform

Level 5

CI test runners as a service: job scheduling, resource pools, parallelism, artifact collection.

7 min 1 diagram practice

29

System 12.29 — CI/CD Platform

Level 5

The delivery pipeline as a product: stages, artifacts, approvals, blue/green and canary deployment.

6 min 1 diagram practice

30

System 12.30 — Multi-tenant SaaS Platform

Level 5

One codebase, many customers: isolation, tenancy models, quotas, billing, and the scaling per tenant.

7 min 1 diagram practice

Level 6

31

System 12.31 — Typeahead / Search Autocomplete

Level 6

Suggest 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

32

System 12.32 — Web Crawler

Level 6

Fetch 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

33

System 12.33 — Distributed Key-Value Store (Dynamo-style)

Level 6

Design 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

34

System 12.34 — Proximity Service (Nearby Places / Yelp)

Level 6

Find 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

35

System 12.35 — Collaborative Document Editor (Google Docs)

Level 6

Many 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

36

System 12.36 — Real-Time Leaderboard

Level 6

Rank 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

37

System 12.37 — Ad Click Aggregation & Top-K Heavy Hitters

Level 6

Count 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

38

System 12.38 — Hotel Reservation System

Level 6

Book 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

39

System 12.39 — Distributed Message Queue (design Kafka)

Level 6

Design 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