Diagram the system, defend the trade-offs.
Pick a canonical HLD problem and walk through it the way you would on a whiteboard interview — clarify requirements, estimate capacity, sketch the architecture, and reason about scale concerns. The board uses Excalidraw and saves to your browser.
Design a URL Shortener
Bit.ly-class system: Base62 IDs, key-value store, edge cache, ~10× read/write skew.
Design Twitter (Timeline)
Fan-out on write vs. read, with a hybrid for celebrity accounts. The classic timeline trade-off.
Design Instagram (Photo feed)
Object storage for media, CDN-fronted feed, hybrid fan-out timeline.
Design a Rate Limiter
Token bucket vs. sliding window log vs. sliding window counter — and where to deploy them.
Design a Distributed Cache
Consistent hashing, replication for read-heavy workloads, and the cache-stampede problem.
Design a Chat System (WhatsApp-class)
Persistent connections, fanout per device, store-and-forward for offline users.
Design YouTube / Netflix
Adaptive bitrate streaming, edge CDNs, and the upload → transcode → publish pipeline.
Design Uber (Dispatch & Trip)
Geospatial driver index, dispatch matching, and the trip state machine across services.
Design Google Drive / Dropbox
Block-level deduplication, delta sync, conflict resolution, and a metadata model that scales to billions of files.
Design a Web Crawler (Googlebot-class)
Politeness-aware distributed crawler with a frontier queue, dedupe, and DNS-first discovery — scales to billions of pages.
Design Search Autocomplete (Google / YouTube Suggest)
Trie-backed prefix matching with personalised reranking, served at p99 < 100 ms across billions of queries/day.
Design a Notification Service (Push, Email, SMS)
Multi-channel delivery with templating, user preferences, batching, and provider-failover at billions of sends/day.
Design Pastebin (Code-paste / Snippet sharing)
URL-shortener-class read path with text bodies in object storage, expiry, syntax-highlight, and abuse controls.
Design a News Feed (Facebook / LinkedIn)
Ranked timeline at FB/LI scale: hybrid fan-out, ML reranker, dwell-time signals, story TTLs, and ad insertion.
Design Yelp / Nearby Friends
Geospatial search at p95 < 200 ms: S2/H3 indexing, multi-attribute ranking, and a streaming friend-proximity service.
Design a Distributed Job Scheduler
Cron-class scheduler at planet scale: leases, exactly-once-effect, retries with back-off, DAG dependencies, and at-most-once concurrency.
Design a Stock Exchange Matching Engine
Sub-millisecond matching engine: in-memory order book, deterministic ordering, FIX gateways, market-data fan-out, and replay-based DR.
Design a Payment System (Stripe / PayPal-class)
Idempotent payment intents, two-phase commit with PSPs, ledger-based double-entry accounting, fraud + chargeback flows, and PCI scope minimization.
Design a Distributed Counter
Sharded counters at 1 M+ writes/sec with bounded staleness reads, used for view counts, like counts, and rate aggregations.
Design a Multiplayer Game Server (FPS / battle royale)
Authoritative game server: tick-based simulation, lockstep / client-prediction, regional matchmaking, anti-cheat, and ~100 ms p95 round-trip.
Design Google Docs (Real-time Collaboration)
OT or CRDT-based concurrent editing, presence, comments, version history, with sub-50 ms keystroke echo and offline support.
Design a Distributed Message Queue (Kafka-class)
Partitioned, replicated, append-only log with at-least-once delivery, ordered partitions, and consumer groups at 1M+ msgs/sec.
Design an API Gateway
Edge proxy with auth, rate-limiting, routing, observability, request transformation, and circuit breakers — at < 5 ms p99 added latency.
Design Spotify (Music Streaming)
Audio CDN with per-segment DRM, personalized playlists, search, social, and a recommender that closes the loop in minutes.
Design Ad Click Aggregation
Sub-minute aggregation of billions of click events with idempotent dedup, fraud filtering, and real-time + batch reconciliation.
Design a Distributed Logging System
Aggregated logging at TB/day: agent → broker → indexed store, with structured search, retention tiers, and rate-limit-aware ingestion.
Design Top-K / Trending (real-time heavy hitters)
Approximate top-K at billions of events/day using Count-Min Sketch + heap, with multi-window leaderboards (1m, 1h, 1d).
Design BookMyShow / Ticketmaster (Concurrent Seat Booking)
High-contention seat reservations: locking, idempotent payment, queue-based fairness, anti-bot, and inventory consistency at flash-sale scale.