Classic Practice Problems
Master the iconic 26 system design interview problems:
All Topics in Phase 17
0 of 26 completedArchitect a global URL shortener: Base62 encoding vs MD5 hashing, collision handling, Range-Based Counter Token Servers (ZooKeeper), and Redis caching.
Protect APIs from overload: Token Bucket in Redis with Lua scripts, Sliding Window Counters, race condition handling, and Gateway edge integration.
Store and share plain text snippets: Object storage (S3) for paste content, Relational/NoSQL metadata indexing, TTL auto-expiration, and custom vanity URLs.
Crawl the World Wide Web: URL Frontier, Politeness policies (robots.txt, domain delay), Duplicate detection (Bloom Filters & SimHash), and distributed workers.
Build a distributed in-memory cache: Consistent Hashing with virtual nodes, $O(1)$ LRU eviction (HashMap + Doubly Linked List), Master-Replica replication, and gossip cluster state.
Implement Amazon's Dynamo paper: Tunable Quorum consistency ($N, W, R$), Vector Clocks for conflict detection, Gossip membership, Hinted Handoff, and Merkle Trees.
Generate 64-bit unique IDs at scale: Twitter Snowflake 64-bit binary layout (1-bit sign, 41-bit timestamp, 10-bit worker ID, 12-bit sequence), time-sortability, and clock drift handling.
Send billions of push/SMS/email alerts: Multi-channel adapters (APNs, FCM, Twilio, SendGrid), user preference matrices, rate-limiting spam filters, and SQS priority queues.
Generate personalized timelines: Fan-out on Write (Push) vs Fan-out on Read (Pull), Hybrid Fan-out for celebrity accounts, Redis timeline caching, and ranking.
Architect real-time chat: Persistent WebSockets, Gateway connection manager, Erlang/Go actor model, message delivery status (sent, delivered, read), and group chat fan-out.
Stream video at scale: Adaptive Bitrate Streaming (HLS / DASH), Video chunking, Asynchronous DAG transcoding pipelines, and CDN edge video caching.
Track drivers and dispatch rides: Geospatial indexing (Uber H3 Hexagons vs Google S2 vs Geohashes), real-time driver location updates, matching engine, and surge pricing.
Prevent seat overbooking: Temporary reservation locks (10-minute hold), Distributed Redis locks with TTL, ACID seat inventory transactions, and Virtual Waiting Rooms.
Process high-scale e-commerce orders: Distributed cart management, atomic inventory decrementing, idempotent payment settlement, and Saga order fulfillment.
Deliver instant search suggestions: Trie (Prefix Tree) data structure, Trie node caching (Top 10 suggestions per node), MapReduce prefix aggregation, and browser debouncing.
Sync files across devices: Chunking (4MB blocks), Content-addressed storage (SHA-256 hash), Delta sync (rsync algorithm), metadata synchronization, and conflict resolution.
Unify social media primitives: User follow graph (Graph DB / B-Tree), photo upload presigned pipeline, Redis home timeline feed, and follower counters.
Guarantee zero money loss: Idempotency keys, Double-entry bookkeeping ledger (immutability), Reconciliation pipelines, and PCI-DSS vault tokenization.
Execute millions of timed jobs: Time-bucket database partitioning, Leader-elected dispatcher, Priority task queues, and durable execution state machines.
Architect edge perimeter infrastructure: Dynamic path-based routing, JWT token validation, distributed token bucket rate limiting, and circuit breaking.
Rank millions of players: Redis Sorted Sets (`ZADD`, `ZREVRANGE`), Skip List internals, handling millions of score updates, and monthly archival partitioning.
Find nearby places: QuadTrees in memory, Geohashes in Redis, Google S2 geometry, spatial sharding, and business review caching.
Real-time multi-party video: WebRTC peer-to-peer limits, Selective Forwarding Units (SFU) vs MCU, UDP media transport, and audio mixing.
Build a global edge cache: BGP Anycast routing, Edge Points of Presence (PoPs), Consistent Hashing cache proxy clusters, Origin Shield tiering, and cache purge propagation.
Ingest and query trillions of metrics/logs: Agent collector (Vector/FluentBit), Kafka ingestion buffer, Time-Series DB (M3DB/Prometheus), and inverted index log storage.