High-Level System Design (HLD)
A comprehensive, visual curriculum covering computer networking, storage engines, caching patterns, asynchronous pipelines, distributed consensus, security, and 21 flagship real-world system case studies.
Track 1 — Core Foundations, Frameworks & Networking
Interview frameworks, hardware limits, scaling philosophy, back-of-the-envelope math, and TCP/IP stack.
What is System Design?
The localhost trap, 3 core building blocks, interactive scaling simulator, and problem decomposition.
Vertical vs Horizontal Scaling
Scale Up vs Scale Out, the physical hardware ceiling, and the stateless golden rule.
Capacity Estimation & Math
Master back-of-the-envelope calculations: QPS, Peak QPS, Storage/Year, RAM 80/20 rule, and Bandwidth.
The 4-Step Interview Framework
Master Alex Xu's 4-step interview strategy: Step 1 (Scope) ➔ Step 2 (High-Level Design & APIs) ➔ Step 3 (Deep Dive Bottlenecks) ➔ Step 4 (Wrap Up).
HTTP & The Internet TCP/IP Stack
The 4-layer TCP/IP model, HTTP/1.1 vs HTTP/2 Multiplexing vs HTTP/3 (QUIC), and TCP 3-way handshake.
What Happens When You Enter a URL?
The #1 classic interview question: 8-stage interactive tracer from browser keystroke to pixels on screen.
Processes, Threads & Concurrency
Processes, thread memory models, event loops vs worker pools, and context switching costs.
Thrashing & Memory Bottlenecks
Virtual memory, page tables, TLB cache misses, working set exhaustion, and cache churn.
Track 2 — Load Balancing & Network Distribution
Traffic balancing, DNS lookups, Edge CDNs, and Consistent Hashing rings.
Load Balancer Placement
Evenly distribute traffic, prevent server crashes, and explore Layer 4 vs Layer 7 routing differences.
DNS + CDN Basics
How DNS resolves domain names and how Edge CDNs serve cached static assets in <10ms.
Design Consistent Hashing
Hash rings, virtual nodes, zero-downtime key rebalancing, and avoiding distributed cache stampedes.
Track 3 — DataStores & Storage Engines
Relational vs NoSQL, Replication, Sharding, B-Tree Indexes, Distributed KV Stores, and Spatial indexing.
SQL vs NoSQL Selection
Relational ACID tables vs Document, Key-Value, Columnar, and Graph data stores.
Database Replication
Scale read-heavy workloads with Leader-Follower architecture, sync/async replication, and failover.
Sharding Strategy Design
Hash vs Range vs Directory partitioning, shard key selection, and cross-shard join challenges.
Database Indexes & B-Trees
B+ Tree fan-out, disk page I/O, Clustered vs Secondary indexes, and write penalty trade-offs.
Design a Distributed Key-Value Store
DynamoDB & Cassandra: Quorum Consensus (R + W > N), Vector Clocks, Hinted Handoff, and Merkle Trees.
LSM Trees & SSTable Storage Engines
Cassandra & RocksDB: Write-Ahead Logs (WAL), MemTables, Bloom Filters, and SSTable compaction.
Geospatial DBs & Spatial Indexing
Uber & Yelp proximity search: Geohashes, 8-neighbor expansion, QuadTrees, and Google S2 Hilbert Curves.
Zero-Downtime DB Migrations
The Expand & Contract pattern, dual writing, non-blocking backfilling, and GitHub's gh-ost.
Track 4 — Caching & Memory Architecture
In-memory caching strategies, Redis Clusters, eviction policies, and Bloom Filters.
Caching Strategies & Placement
Serve 95%+ of queries in <1ms from RAM: Cache-Aside, Write-Through, and prevent cache disasters.
Distributed Caching & Eviction
Redis Cluster 16,384 Hash Slots, single-threaded event loop, RDB/AOF persistence, and O(1) LRU eviction.
Bloom Filters & Probabilistic Math
Eliminate expensive disk reads on cache misses with Bloom Filters and count billions with HyperLogLog.
Track 5 — Communication Patterns & Asynchronous Systems
Sync vs Async, Task Queues, Pub/Sub Fan-Out, Snowflake ID Generator, and Transactional Outbox.
Sync vs Async Boundaries
Prevent thread starvation and 504 timeouts with HTTP 202 Accepted, Task Queues, and Idempotency.
Message Queue vs Pub-Sub
1-to-1 Competing Consumers vs 1-to-Many Fan-Out, RabbitMQ vs Kafka vs SQS, and Partition Keys.
Unique ID Generator (Twitter Snowflake)
64-bit Snowflake IDs (Timestamp + Node + Sequence), clock drift, node ID assignment, and UUIDv7.
Real-Time WebSockets & SSE
Full-duplex WebSockets, Server-Sent Events (SSE), sticky sessions, Redis backplanes, and fallback long-polling.
Transactional Outbox & CDC
Solving the dual-write problem: Transactional Outbox pattern with Change Data Capture (Debezium).
API Design: REST vs GraphQL vs gRPC
Comparing JSON REST vs GraphQL flexibility vs binary gRPC/Protobuf throughput for internal microservices.
Track 6 — Consistency, Transactions & Distributed Consensus
CAP Theorem, PACELC, isolation levels, 2-Phase Commit, and the Saga pattern.
CAP Theorem & Consistency Models
CAP & PACELC trade-offs, Linearizability, Sequential, Causal, and Eventual Consistency models.
Isolation Levels & Distributed Sagas
ACID isolation (Read Committed to Serializable) vs 2-Phase Commit (2PC) and Distributed Sagas.
Track 7 — Distributed Reliability, Rate Limiting & DevOps
Rate limiting algorithms, Circuit Breakers, Service Discovery, and OpenTelemetry.
Design a Distributed Rate Limiter
Token Bucket, Leaky Bucket, Sliding Window Log, and atomic Redis Lua rate limiting at scale.
Fault Tolerance & Circuit Breakers
Preventing cascading outages: Circuit Breakers (Closed/Open/Half-Open), Bulkheads, and Retries with Jitter.
Service Discovery & Heartbeats
Client-side vs Server-side discovery, Consul/Eureka registration, and health check heartbeats.
Telemetry & Distributed Tracing
The 3 pillars of observability: Metrics (Prometheus), Logs, and OpenTelemetry Distributed Tracing.
Monolith to Microservices Evolution
When to migrate, the Strangler Fig pattern, Anti-Corruption Layers (ACL), and Database CDC.
Track 8 — Security & Authentication Mechanisms
JWT tokens, OAuth 2.0 / OpenID Connect, and Role-Based Access Control (RBAC).
Token-Based Auth & JWTs
Stateless JWT anatomy, HMAC vs RSA signatures, Access & Refresh token rotation, and Redis revocation blacklists.
OAuth 2.0 & OpenID Connect
Delegated authorization, Authorization Code Grant with PKCE, ID Tokens vs Access Tokens, and M2M flows.
Authorization: ACL, RBAC & ABAC
Fine-grained permissions, Role Explosion solutions, Attribute-Based (ABAC), Google Zanzibar (ReBAC), and OPA.
Track 9 — System Design Trade-Off Frameworks
Pull vs Push models, Throughput vs Latency, Memory vs Latency, and Latency vs Accuracy.
Pull vs. Push & Fan-Out Systems
Client Pull vs Server Push, Fan-Out-on-Write vs Read, Twitter Celebrity Problem, and Hybrid Fan-Out.
Latency, Throughput, Memory & Accuracy
The architectural quadrangle: Batching vs Streaming, Memory caching vs cold storage, and Exact SQL vs HyperLogLog.
Track 10 — Flagship Real-World System Case Studies
21 battle-tested system design interview problems with full end-to-end architecture diagrams.
System Design Architecture Studio & AI Evaluator
Draw architectures on a freehand whiteboard canvas or drag-and-drop cloud components with live AI grading.
Design a URL Shortener (TinyURL)
Base62 encoding, Key Generation Service (KGS), 301 vs 302 redirect caching, and DB sharding.
Design a Web Crawler (Googlebot)
URL Frontier (Priority + Politeness queues), HTML Parser, SimHash deduplication, and DNS cache.
Design a Notification System
APNs (iOS), FCM (Android), SMS/Email workers, priority message queues, and user rate limits.
Design a News Feed System
Feed publishing vs news feed generation, Fan-out on write vs read, and Redis Timeline caching.
Design a Chat System (WhatsApp)
WebSocket stateful servers, message sync flow, group chat message fan-out, and online presence.
Search Autocomplete (Typeahead)
Trie data structure in RAM, frequency node caching, Top-K aggregation, and weekly prefix updates.
Design YouTube Video Streaming
Video upload flow, DAG-based parallel transcoding scheduler, adaptive HLS/DASH bitrates, and CDN.
Design Google Drive / Dropbox
Block-level 4MB chunking, Delta Sync (upload modified blocks only), S3 storage, and sync conflict resolution.
Rate Limiter as a Service
Multi-tenant tier quota isolation, high-throughput Redis cluster, and fallback bypass.
Distributed Unique ID Generator
Twitter Snowflake 64-bit ID generator service, clock drift handling, and high-throughput sequence counters.
Instagram Photo Sharing & Feed
High-throughput photo uploads, news feed generation, follow graph, and object storage.
Tinder Proximity Matching
Sub-second radius geospatial matching, bidirectional swipe tracking, and real-time match events.
TikTok Video Feed & Delivery
Ultra-low-latency short video chunking, recommendation pipeline fan-out, and edge caching.
Online Coding Judge (LeetCode)
Sandboxed container execution (Docker/gVisor), resource limit throttling, and test case evaluation.
UPI Real-Time Payment Switch
High-availability payment orchestration, bank-to-bank settlement, idempotency, and ACID ledgers.
IRCTC High-Concurrency Booking
Tatkal flash reservations, atomic seat locking in Redis, queue buffering, and payment reconciliation.
DoorDash Food Delivery & Dispatch
Courier auto-dispatch engine, dynamic ETA calculations, merchant order queue, and live GPS tracking.
Amazon E-Commerce & Flash Sales
Shopping cart state, flash sales inventory reservation, catalog search, and checkout pipelines.
Google Maps Location & Routing
Map tile rendering, road network graph partition, A* / Dijkstra shortest path, and real-time traffic.
Gmail Email Storage & Search
Distributed inbox storage, full-text inverted indexing, attachment deduplication, and spam pipelines.
Google Docs Collaborative Editor
Real-time concurrent multi-user editing, Operational Transformation (OT) vs CRDTs, and undo history.