Course 08 · Orientation
Worked Systems
Shortener, limiter, feed, chat
Four systems the public design canon keeps returning to, because each one needs a different block: a cached key lookup, a counter on the request path, fanout, and an ordered log behind live connections.
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
URL Shortener
The smallest full design: a key, a cache, and a code scheme with no collision checks.
Stage 1
Base-62 Encoding of Unique IDs
Stage 2
Distributed ID Generation (Snowflake)
Stage 3
Lazy Expiry on the Read Path
- 02Pro
Rate Limiter
A tiny atomic counter in front of an expensive handler.
Stage 1
Token Bucket Rate Limiting
Stage 2
Layered Limits by IP and Account
Stage 3
Distributed Counters with Atomic Increments
- 03Pro
News Feed
Fanout on write, with celebrities merged on read.
Stage 1
Fanout-on-Read (Pull Model)
Stage 2
Fanout-on-Write (Push Model)
Stage 3
Hybrid Fanout for Celebrities
- 04Pro
Chat
A log for every conversation, and live connections for whoever is online.
Stage 1
Ordered Logs & Sync Cursors
Stage 2
Heartbeats & TTL Presence
Stage 3
Group Fanout with Pub/Sub & Read Cursors