Course 07 · Orientation
Building Blocks
Cache, database, queue, partition
The components behind almost every design: a cache for hot reads, a database with the right key, a queue for work the user should not wait for, and partitioning when one machine is truly the limit.
The course journey
Build one family of skills at a time
Each technique is three short lessons, and each one builds on the lesson before it. A lesson walks through one problem step by step, then hands it to you along with a few more to solve on your own.
- Preview01Start here
Caching
Cache-aside on the hot key, with a plan for staleness and stampedes.
Stage 1
Cache-Aside with LRU Eviction
Stage 2
TTL & Write Invalidation
Stage 3
Stampede Protection (Request Coalescing)
- 02Pro
Databases
A key, a replica, and a shard only when a number says so.
Stage 1
Primary-Key Access Patterns
Stage 2
Read Replicas & Read-Your-Writes
Stage 3
Sharding by Access Key
- 03Pro
Queues
Work the user should not wait for, delivered at least once.
Stage 1
Async Work Off the Request Path
Stage 2
At-Least-Once Delivery & Idempotent Consumers
Stage 3
Backpressure & Queue Depth
- 04Pro
Partitioning
Consistent hashing, the right key, and the hot key hashing cannot fix.
Stage 1
Consistent Hashing
Stage 2
Partition Key Selection
Stage 3
Hot-Key Mitigation