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.
Introduction to Architecture
Request-Response lifecycle, components, Monolith vs Microservices, and latency numbers.
Scale from Zero to Millions of Users
When to Scale Up vs Scale Out, stateless server fleets, and Redis session stores.
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 URL parse to DOM rendering.
Processes, Threads & Concurrency
Process vs Thread memory boundaries, Concurrency vs Parallelism, Context switching, and Thread Pools.
Thrashing & Memory Bottlenecks
Working set vs RAM limits, OS page swap thrashing, and cache churn degradation under heavy load.
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, minimizing key migration during node add/remove, and hot-spot mitigation.
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-Trees vs Hash indexes, Clustered vs Non-clustered, and read speedup vs insert write penalties.
Design a Distributed Key-Value Store
DynamoDB architecture: Quorum Consensus ($R+W>N$), Vector Clocks, Hinted Handoff, and Merkle Trees.
LSM Trees & SSTable Storage Engines
Why Cassandra/RocksDB write at 1M+ ops/sec: WAL, MemTables, and immutable SSTable compactions.
Geospatial DBs & QuadTrees
Geohashing, QuadTrees, Google S2 cells, and sub-millisecond proximity queries for Uber and Tinder.
Zero-Downtime DB Migrations
The Expand-and-Contract pattern, dual writing, historical backfilling, and safe column cutover.
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 vs Memcached, and eviction algorithms: LRU, LFU, Segmented LRU, and 2Q caches.
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)
Why auto-increment fails in distributed systems: 64-bit Snowflake IDs (Timestamp + Node + Sequence).
Real-Time WebSockets & SSE
Full-duplex WebSockets, Server-Sent Events (SSE), and fallback long-polling for real-time applications.
Transactional Outbox & CDC
Solving the dual-write problem: Transactional Outbox pattern with Change Data Capture (Debezium).
API Design: REST, GraphQL, 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 Migration
When to migrate, the Strangler Fig pattern, Anti-Corruption Layers, and Containerization basics.
Track 8 — Security & Authentication Mechanisms
JWT tokens, OAuth 2.0 / OpenID Connect, and Role-Based Access Control (RBAC).
Token-Based Auth (JWT)
JWT signature verification (HMAC vs RSA), Access & Refresh token rotation, and Redis revocation lists.
OAuth 2.0 & OpenID Connect
Authorization Code Flow with PKCE, single sign-on (SSO), and delegating third-party API permissions.
Authorization: ACL, RBAC & ABAC
Role-Based vs Attribute-Based access control, Rule engines, and Policy decoupling (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 Architectures
Pull-based polling vs Push-based streaming, and hybrid fan-out for high-follower celebrity accounts.
Latency, Throughput & Accuracy
Throughput vs Latency (batching), Memory vs Latency (caches), and Latency vs Accuracy (HyperLogLog).
Track 10 — Flagship Real-World System Case Studies
21 battle-tested system design interview problems with full end-to-end architecture diagrams.
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.