System Design
System Design Crash Course
A fast-track, 30-module system design course - foundations, six database deep dives, caching, the distributed-systems stack, streaming, storage & compute, reliability and observability. Built by a Netflix/AWS-led team.
System Design Crash Course
A complete, fast-track tour of system design as a discipline - the full vocabulary and the production depth, in 30 focused modules. Authored by Brandon Carter (Amazon L7 Principal, S3 distributed storage) with guest lessons from Nikhil Joshi (Google/Spanner), Emeka Okafor (Netflix/Kafka), and Deepika Nair (Meta/AI Infrastructure).
You'll move through the foundations (what HLD really is, the five design dimensions and their trade-offs, back-of-envelope estimation, the browser-to-server path, API styles, reverse proxies and load balancing, the storage hierarchy, indexing, transactions), six database deep dives (PostgreSQL, MySQL, MongoDB, DynamoDB, Cassandra, Elasticsearch), the caching layer (strategies, Redis & Memcached), the distributed-systems backbone (replication, partitioning and consistent hashing, consistency models, distributed transactions, coordination services), async communication (message queues, Kafka event streaming, Flink & Spark processing), storage and compute (S3, AWS Lambda, Docker & Kubernetes), and the operational layer (reliability patterns and observability with Prometheus).
The first module is free to preview. The full course is a one-time purchase with lifetime access.
What you will learn
- What HLD actually is — vs LLD, vs design docs — and the five design dimensions and their trade-offs
- Back-of-envelope estimation, the browser-to-server path, API styles, reverse proxies and load balancing
- The storage hierarchy, indexing strategies, and transactions / isolation / concurrency control
- Six database deep dives: PostgreSQL, MySQL, MongoDB, DynamoDB, Cassandra, Elasticsearch
- Caching strategies plus Redis & Memcached in practice
- The distributed-systems backbone: replication, partitioning & consistent hashing, consistency models, distributed transactions, coordination services
- Async communication and processing: message queues (RabbitMQ, SQS), Kafka, Flink & Spark
- Storage & compute (S3, Lambda, Docker & Kubernetes) and operations (reliability patterns, observability with Prometheus)
Prerequisites
- Comfort with basic programming and web fundamentals
Course outline
Module 1: What System Design (HLD) Is
What System Design (HLD) Is — 7 topics.
- The Discipline of HLD: What It Is, What It Isn't 10 min read
- HLD vs LLD vs Design Docs vs Architecture 11 min read
- The Five-Component Mental Model 13 min read
- Reading Existing Systems 11 min read
- Failure as a Design Dimension 12 min read
- How HLD Evolves Over a System's Lifetime 12 min read Pro lesson
- Module Reflection from Brandon 12 min read Pro lesson
Module 2: The Five Dimensions and Their Trade-offs
The Five Dimensions and Their Trade-offs — 7 topics.
- Latency, Precisely (P50, P95, P99, P999) 10 min read
- Throughput vs Latency vs Concurrency 10 min read
- Availability: Nines, SLAs, and What 99.9% Actually Allows 10 min read
- Consistency: The Spectrum (Preview) 11 min read
- Durability: Write Durability, Replication, and What "Lost" Means 12 min read
- Trade-offs in Practice: CAP and PACELC 10 min read Pro lesson
- How Senior Engineers Reason About Trade-offs 11 min read Pro lesson
Module 3: Back-of-Envelope Estimation
Back-of-Envelope Estimation — 7 topics.
- The Latency Numbers to Memorize 10 min read
- The Throughput Numbers to Memorize 10 min read Pro lesson
- Storage Estimation Patterns 11 min read Pro lesson
- Traffic Estimation Patterns 11 min read Pro lesson
- Fermi Reasoning Under Uncertainty 11 min read Pro lesson
- Worked Example: Sizing a Social Media Feed 11 min read Pro lesson
- Worked Example: Sizing a Cache Layer 12 min read Pro lesson
Module 4: From Browser to Server
From Browser to Server — 8 topics.
- DNS Resolution End-to-End 10 min read
- TCP Handshake and Connection Management 11 min read Pro lesson
- TLS 1.2 vs TLS 1.3 Handshakes 10 min read Pro lesson
- HTTP/1.1: The Baseline and Its Limits 9 min read Pro lesson
- HTTP/2: Multiplexing, Server Push, Header Compression 10 min read Pro lesson
- HTTP/3 over QUIC 10 min read Pro lesson
- Connection Pooling, Keep-Alive, Head-of-Line Blocking 9 min read
- Where Latency Comes From: The Breakdown 10 min read Pro lesson
Module 5: API Styles
API Styles — 7 topics.
- REST as a Discipline (Not "JSON over HTTP") 11 min read
- gRPC and Protobuf: When Binary Protocols Win 10 min read Pro lesson
- GraphQL: The Actual Trade-offs Beyond the Marketing 11 min read Pro lesson
- WebSocket for Bidirectional Communication 10 min read Pro lesson
- Server-Sent Events for Server Push 9 min read Pro lesson
- Webhooks and Async Callbacks 10 min read Pro lesson
- Choosing Between Styles for a Given System 11 min read Pro lesson
Module 6: Reverse Proxies & Load Balancing (Nginx)
Reverse Proxies & Load Balancing (Nginx) — 7 topics.
- What a Reverse Proxy Is and Why 11 min read
- Layer 4 vs Layer 7 Load Balancing 12 min read Pro lesson
- Load Balancing Algorithms 12 min read Pro lesson
- Sticky Sessions and When They're a Smell 10 min read Pro lesson
- Nginx Configuration Patterns 10 min read Pro lesson
- TLS Termination and Connection Management 10 min read Pro lesson
- Comparison: Nginx vs HAProxy vs Envoy vs ALB 11 min read Pro lesson
Module 7: The Storage Hierarchy
The Storage Hierarchy — 7 topics.
- The Full Hierarchy: Registers to Cold Storage 12 min read
- CPU Caches and Why Application Developers Should Care 11 min read Pro lesson
- RAM Characteristics and Limits 11 min read Pro lesson
- SSDs: How They Actually Work 11 min read Pro lesson
- HDDs: When They're Still Right 10 min read Pro lesson
- Network-Attached Storage (EBS, NFS, S3) 10 min read Pro lesson
- IOPS Economics and the Cost Model 10 min read Pro lesson
Module 8: Indexing Strategies
Indexing Strategies — 7 topics.
- Life Without Indexes 10 min read Pro lesson
- B-trees and B+ trees in Depth 11 min read Pro lesson
- LSM-trees: Optimized for Writes 10 min read Pro lesson
- Hash Indexes 8 min read Pro lesson
- Inverted Indexes (Preview of Elasticsearch) 10 min read Pro lesson
- Bloom Filters and Other Probabilistic Structures 10 min read Pro lesson
- When Indexes Hurt: Write Amplification, Planner Mistakes 9 min read Pro lesson
Module 9: Transactions, Isolation, Concurrency Control
Transactions, Isolation, Concurrency Control — 7 topics.
- ACID Precisely Defined 10 min read Pro lesson
- Isolation Levels: Read Uncommitted to Serializable 10 min read Pro lesson
- Phantom Reads, Lost Updates, Write Skew 11 min read Pro lesson
- MVCC Explained 10 min read Pro lesson
- Locking-Based Concurrency 11 min read Pro lesson
- Optimistic Concurrency 9 min read Pro lesson
- Where Each Isolation Level Breaks 11 min read Pro lesson
Module 10: PostgreSQL Deep Dive
PostgreSQL Deep Dive — 8 topics.
- Why PostgreSQL (The Default-Good Answer) 9 min read Pro lesson
- MVCC Implementation in Postgres 9 min read Pro lesson
- Index Types: B-tree, Hash, GIN, GiST, BRIN 10 min read Pro lesson
- Partial and Expression Indexes 8 min read Pro lesson
- EXPLAIN and EXPLAIN ANALYZE 9 min read Pro lesson
- Replication: Streaming and Logical 9 min read Pro lesson
- Scaling Patterns: Read Replicas, Partitioning, Citus 9 min read Pro lesson
- When PostgreSQL Is the Wrong Answer 9 min read Pro lesson
Module 11: MySQL Deep Dive
MySQL Deep Dive — 7 topics.
- When MySQL Over PostgreSQL 9 min read Pro lesson
- InnoDB Architecture 10 min read Pro lesson
- The Buffer Pool 10 min read Pro lesson
- Clustered Indexes and the Data Layout Difference 11 min read Pro lesson
- Replication: Async, Semi-Sync, Group, GTIDs 10 min read Pro lesson
- MySQL at Scale: Vitess and Sharding 10 min read Pro lesson
- Honest PostgreSQL vs MySQL Comparison 8 min read Pro lesson
Module 12: MongoDB Deep Dive
MongoDB Deep Dive — 7 topics.
- When Document Models Fit 10 min read Pro lesson
- BSON and the Schema-less Myth 8 min read Pro lesson
- Replica Sets and Elections 10 min read Pro lesson
- Sharding: Hashed vs Ranged 10 min read Pro lesson
- Aggregation Pipeline 9 min read Pro lesson
- Indexing Patterns for Documents 9 min read Pro lesson
- Honest Take: When MongoDB Is Wrong 9 min read Pro lesson
Module 13: DynamoDB Deep Dive
DynamoDB Deep Dive — 7 topics.
- The DynamoDB Model 9 min read Pro lesson
- Partition Key as the Central Decision 10 min read Pro lesson
- GSIs vs LSIs 10 min read Pro lesson
- On-Demand vs Provisioned Capacity 9 min read Pro lesson
- Hot Partitions and How to Avoid Them 10 min read Pro lesson
- Single-Table Design 11 min read Pro lesson
- DynamoDB Streams and Event-Driven Patterns 10 min read Pro lesson
Module 14: Cassandra Deep Dive
Cassandra Deep Dive — 7 topics.
- When Cassandra Over DynamoDB 9 min read Pro lesson
- Ring Topology and Consistent Hashing 11 min read Pro lesson
- Tunable Consistency (ONE, QUORUM, ALL) 10 min read Pro lesson
- Partition Keys and Clustering Columns 11 min read Pro lesson
- Compaction Strategies 13 min read Pro lesson
- Anti-patterns: Queue, Joins, Ad-hoc Queries 11 min read Pro lesson
- Real-World Deployments: Netflix, Discord, Apple 10 min read Pro lesson
Module 15: Elasticsearch Deep Dive
Elasticsearch Deep Dive — 7 topics.
- Inverted Indexes in Detail 10 min read Pro lesson
- Segments and Shards 10 min read Pro lesson
- Scoring: TF-IDF and BM25 10 min read Pro lesson
- Refresh Interval and Near-Real-Time 8 min read Pro lesson
- Aggregations 10 min read Pro lesson
- When Elasticsearch Is the Wrong Tool 11 min read Pro lesson
- Alternatives: Meilisearch, Typesense, Postgres FTS 9 min read Pro lesson
Module 16: Caching Strategies
Caching Strategies — 7 topics.
- Caching as Denormalization 11 min read Pro lesson
- Cache-Aside, Write-Through, Write-Back, Write-Around 11 min read Pro lesson
- TTL Strategies 10 min read Pro lesson
- Cache Invalidation 10 min read Pro lesson
- Cache Stampedes and Prevention 11 min read Pro lesson
- CDN as a Cache 11 min read Pro lesson
- When NOT to Cache 11 min read Pro lesson
Module 17: Redis & Memcached
Redis & Memcached — 8 topics.
- Redis vs Memcached: the High-Level Comparison 9 min read Pro lesson
- Redis Data Structures 12 min read Pro lesson
- Redis Persistence: RDB and AOF 10 min read Pro lesson
- Redis Replication and Sentinel 10 min read Pro lesson
- Redis Cluster 10 min read Pro lesson
- Memcached: When Simpler Is Better 9 min read Pro lesson
- Redis as a Primary Database 9 min read Pro lesson
- The Decision Framework, Summed Up 8 min read Pro lesson
Module 18: Replication
Replication — 8 topics.
- Why We Replicate 10 min read Pro lesson
- Leader-Follower (Single-Leader) Replication 10 min read Pro lesson
- Multi-Leader Replication 11 min read Pro lesson
- Leaderless Replication (Dynamo-Style) 12 min read Pro lesson
- Synchronous vs Asynchronous Replication 9 min read Pro lesson
- Replication Lag and the Bugs It Causes 10 min read Pro lesson
- Read-Your-Writes, Monotonic Reads, Consistent Prefix Reads 12 min read Pro lesson
- Guest: Nikhil on Google Spanner at Scale 13 min read Pro lesson
Module 19: Partitioning & Consistent Hashing
Partitioning & Consistent Hashing — 7 topics.
- Why Partition 9 min read Pro lesson
- Range-Based Partitioning 10 min read Pro lesson
- Hash-Based Partitioning 10 min read Pro lesson
- Consistent Hashing in Detail 12 min read Pro lesson
- Virtual Nodes 10 min read Pro lesson
- Rebalancing When Topology Changes 11 min read Pro lesson
- Hot Spots and Mitigation 12 min read Pro lesson
Module 20: Consistency Models
Consistency Models — 7 topics.
- Why Consistency Is Hard 7 min read Pro lesson
- CAP Theorem Properly Explained 9 min read Pro lesson
- PACELC: The More Useful Framing 8 min read Pro lesson
- Linearizability 7 min read Pro lesson
- Sequential and Causal Consistency 8 min read Pro lesson
- Eventual Consistency in Practice 7 min read Pro lesson
- Real-World Choices: AP vs CP 9 min read Pro lesson
Module 21: Distributed Transactions
Distributed Transactions — 7 topics.
- Why Distributed Transactions Are Hard 8 min read Pro lesson
- Two-Phase Commit (2PC) 8 min read Pro lesson
- Why 2PC Mostly Sucks 8 min read Pro lesson
- Saga Pattern (Orchestration vs Choreography) 9 min read Pro lesson
- Outbox Pattern for Reliable Event Publishing 8 min read Pro lesson
- Idempotency Keys as the Practical Answer 8 min read Pro lesson
- Real-World Patterns: Stripe's Idempotency Model 9 min read Pro lesson
Module 22: Coordination Services
Coordination Services — 7 topics.
- What Coordination Is and Why It's Hard 8 min read Pro lesson
- ZooKeeper's Data Model: Znodes and Watches 9 min read Pro lesson
- Ephemeral and Sequential Nodes 8 min read Pro lesson
- ZAB Protocol Overview 9 min read Pro lesson
- Leader Election Patterns 8 min read Pro lesson
- Distributed Locks (and Why They're a Smell) 9 min read Pro lesson
- etcd vs ZooKeeper, and Kubernetes's Choice 10 min read Pro lesson
Module 23: Message Queues (RabbitMQ & SQS)
Message Queues (RabbitMQ & SQS) — 8 topics.
- The Queue Model 8 min read Pro lesson
- RabbitMQ: Exchanges, Queues, Bindings 8 min read Pro lesson
- RabbitMQ: Exchange Types (Direct, Fanout, Topic, Headers) 6 min read Pro lesson
- Dead-Letter Queues and Poison Messages 7 min read Pro lesson
- SQS: Standard vs FIFO 6 min read Pro lesson
- SQS: Visibility Timeout and Long Polling 7 min read Pro lesson
- RabbitMQ vs SQS: When Each Fits 6 min read Pro lesson
- When Queues Are Wrong (Use Streams Instead) 9 min read Pro lesson
Module 24: Event Streaming (Kafka)
Event Streaming (Kafka) — 8 topics.
- The Log Abstraction 7 min read Pro lesson
- Topics, Partitions, Offsets 7 min read Pro lesson
- Producers and the Partitioning Strategy 6 min read Pro lesson
- Consumer Groups and Rebalancing 6 min read Pro lesson
- Exactly-Once Semantics 6 min read Pro lesson
- Log Compaction 5 min read Pro lesson
- Kafka Connect and Schema Registry 6 min read Pro lesson
- Guest: Emeka on Netflix's 8B-Events/Day Pipeline 9 min read Pro lesson
Module 25: Stream & Batch Processing (Flink & Spark)
Stream & Batch Processing (Flink & Spark) — 8 topics.
- Batch vs Stream: The Conceptual Difference 7 min read Pro lesson
- Spark: RDDs, DataFrames, Catalyst 6 min read Pro lesson
- Spark Streaming and Structured Streaming 5 min read Pro lesson
- Flink: The Streaming-First Model 6 min read Pro lesson
- Event Time vs Processing Time 6 min read Pro lesson
- Windowing and Watermarks 7 min read Pro lesson
- Exactly-Once Across the Pipeline 6 min read Pro lesson
- Lambda vs Kappa Architectures 8 min read Pro lesson
Module 26: Object Storage (S3 Deep Dive)
Object Storage (S3 Deep Dive) — 7 topics.
- The Object Storage Abstraction 6 min read Pro lesson
- Buckets, Keys, Prefixes 5 min read Pro lesson
- S3 Consistency Model (and the December 2020 Change) 6 min read Pro lesson
- Storage Classes and Lifecycle Policies 6 min read Pro lesson
- Pre-Signed URLs and Access Patterns 6 min read Pro lesson
- Multipart Upload 5 min read Pro lesson
- S3 as a Data Lake Substrate 8 min read Pro lesson
Module 27: AWS Lambda Deep Dive
AWS Lambda Deep Dive — 7 topics.
- The Lambda Execution Model 6 min read Pro lesson
- Cold Starts: Causes and Mitigations 6 min read Pro lesson
- Concurrency Limits and Quotas 5 min read Pro lesson
- Lambda + API Gateway 4 min read Pro lesson
- Lambda + SQS / Kinesis 4 min read Pro lesson
- When Serverless Wins 4 min read Pro lesson
- When Serverless Loses 7 min read Pro lesson
Module 28: Containers & Orchestration (Docker & Kubernetes)
Containers & Orchestration (Docker & Kubernetes) — 9 topics.
- Why Containers (vs VMs, vs Bare Processes) 5 min read Pro lesson
- Docker: Images, Layers, Union Filesystem 5 min read Pro lesson
- Docker: Networking and Storage 2 min read Pro lesson
- Why Orchestration 3 min read Pro lesson
- Kubernetes: Pods, Services, Deployments 5 min read Pro lesson
- Kubernetes: StatefulSets, DaemonSets, Jobs 2 min read Pro lesson
- Kubernetes Control Plane Internals 4 min read Pro lesson
- When Kubernetes Is Overkill 3 min read Pro lesson
- Guest: Deepika on Kubernetes for Distributed ML Training 7 min read Pro lesson
Module 29: Reliability Patterns
Reliability Patterns — 8 topics.
- Idempotency at the API Level 4 min read Pro lesson
- Retry Strategies and Exponential Backoff 4 min read Pro lesson
- The Thundering Herd Problem 3 min read Pro lesson
- Circuit Breakers 4 min read Pro lesson
- Rate Limiting: Token Bucket, Leaky Bucket, Sliding Window 5 min read Pro lesson
- Backpressure 4 min read Pro lesson
- Bulkheads 3 min read Pro lesson
- Graceful Degradation 5 min read Pro lesson
Module 30: Observability (Prometheus)
Observability (Prometheus) — 9 topics.
- Metrics, Logs, Traces: The Three Pillars 4 min read Pro lesson
- SLIs, SLOs, SLAs 4 min read Pro lesson
- The RED Method (Rate, Errors, Duration) 2 min read Pro lesson
- The USE Method (Utilization, Saturation, Errors) 3 min read Pro lesson
- Prometheus: Pull Model and Time-Series Storage 3 min read Pro lesson
- PromQL 2 min read Pro lesson
- Alertmanager 3 min read Pro lesson
- OpenTelemetry as the Future of Instrumentation 3 min read Pro lesson
- Course Closing: What's Next 5 min read Pro lesson