Reference
The whole course, by shelf.
Use this when you need a topic again. Saved lessons are the ones you bookmarked on the page. Search lives in the header.
Nothing in this filter. Mark a lesson saved, or switch back to All.
Fundamentals
Latency, estimation, and the path a request actually takes.
Latency numbers that matter
A working set of latencies for interviews and for real request paths, with the arithmetic that turns them into a budget.
Week 1Back-of-the-envelope estimation
Turn daily users, actions, and object size into QPS, disk, and bandwidth, and say the peak factor out loud.
Week 1Networking for request paths
What a cold handshake, HTTP version, WebSocket, and timeout actually add on the path a chat send waits for.
Week 1DNS and CDNs
How resolvers, TTL, CNAMEs, anycast, and CDN cache keys decide if the origin sees a lookup or a miss storm.
Week 1Load balancing
How L4 and L7 spread load, why a lost cache node moves about 1/N keys on a ring and almost all of them under modulo.
Storage
How data is laid out, copied, split, and protected.
Choosing a database
Choose the database from the access pattern, keep a schema when it protects an invariant, and stay on one store until a measured pattern forces a second.
Week 2Indexes: B-trees and LSM trees
B-trees rewrite sorted pages for point reads and ranges, while LSM trees append and compact, paying write, read, and space amplification, with bloom filters only as a way to skip files.
Week 2Replication
One leader ships a log, and you either wait for a replica and stall writes or acknowledge first and can lose the tail unless a fence stops the old primary.
Week 2Partitioning and sharding
Hash partitions spread keys and scatter ranges, range partitions keep scans and grow hot spots, a hot key stays on one shard, and a secondary index either scatters the read or adds a write.
Week 3Transactions and isolation
What atomicity, invariants, isolation, and durability promise, and how snapshot isolation still double-books the last seat.
Week 3Caching
Cache-aside, write-through, and write-back, and what a hot product page does to the database at the moment the key expires.
Week 3Object storage
Immutable blobs behind a metadata pointer, why that is not a filesystem, and why video bytes do not belong in a database row.
Week 3Search indexes
An inverted index maps terms to postings, lags the primary store, and only starts its ranking at term frequency.
Week 3Time-series data
Append-mostly metrics from many hosts, compressed and downsampled, and the memory blowup when a user id becomes a label.
Distributed systems
What stays true when machines fail and messages arrive late.
CAP, PACELC, and what they actually say
What a partition forces you to choose, why the pick-two slogan misstates the theorem, and the latency choice you still make when the network is fine.
Week 4Consistency models
A ladder from linearizability to eventual consistency, one history that converges without being linearizable, and the round-trip cost of the strongest rung.
Week 4Consensus and Raft
How Raft elects a leader and commits a log entry, why two majorities cannot both commit, and why agreement does not make a cross-ocean write fast.
Week 4Quorums and leaders
When R plus W exceeds N a read overlaps a write, and lost replies or a sloppy quorum are why that overlap is not linearizability.
Week 4Idempotency and the exactly-once myth
Doing a write twice matches doing it once when it sets state or when a client key stores the first result, which is as close as a charge gets.
Week 4 · AdvancedClocks and ordering
Lamport clocks, vector clocks, hybrid logical clocks, and TrueTime promise different orders, and a wall-clock timestamp is not a substitute for any of them.
Week 4 · AdvancedCRDTs
A CRDT converges without a coordinator because the merge is designed to, and a server that picks the order, including Figma, is not one.
Messaging
Moving facts between services without pretending the network is a function call.
Queues and logs
A queue hands each job to one competing consumer and deletes it on ack, while a log keeps ordered facts that each reader replays from its own offset.
Week 5Kafka
Topics, partitions, keys, consumer groups, rebalance, the ISR, acks, retention, compaction, and lag, with the idempotent producer kept inside Kafka's protocol.
Week 5Delivery guarantees
At-most-once and at-least-once come from when you ack, and exactly-once is a bounded protocol that stops at the edge of the database or the card network.
Week 5Event sourcing and CQRS
The event log is the source of truth, a projection is a fold you can rebuild, and CQRS is a separate choice that most CRUD systems should not take on.
Week 5Stream processing
Event time and processing time diverge, windows close on a watermark that is only a guess about lateness, and a consumer loop is enough until you need that machinery.
Week 5The outbox pattern and sagas
A transactional outbox closes the dual-write hole, and a saga replaces a global rollback with local commits plus compensations that can fail on their own.
Reliability
Limits, signals, and the difference between a slow system and a dead one.
Rate limiting
Token buckets, leaky buckets, and fixed windows reject different traffic, and the limiter has to sit on the resource you are actually protecting.
Week 6Retries, backoff, and circuit breakers
Retry only idempotent calls, sleep a random backoff that still fits the deadline, and fail fast when a dead dependency would otherwise hold every thread.
Week 6Load shedding
When arrivals outrun the work you can finish, reject the surplus at a bounded queue and keep one stuck dependency from spending every thread.
Week 6Observability
Metrics show the shape of a slow checkout, a trace shows which hop, and logs explain one request, as long as labels stay cheap enough to keep.
Week 6SLOs and error budgets
SLI, SLO, SLA, and error budgets, with the 99.9 percent burn-rate arithmetic, and why a page on one slow minute is noise.
Week 6Deploys and chaos
Rolling deploys, blue/green, canaries tied to a user-facing SLI, feature flags, and chaos as a hypothesis with a blast radius and an abort.
Architecture
Where the boundaries go, and who is allowed to cross them.
Service boundaries
A network boundary is worth paying for only when a team, a scale shape, or a compliance rule forces the split, because a synchronous chain multiplies latency and failure.
Week 7API design
Design resources around idempotent methods, cursor pages, and additive versions, and treat GraphQL, gRPC, and error bodies as choices a client can act on.
Week 7Gateways and service mesh
A gateway authenticates, limits, and routes at the edge, the service keeps the business rule, and client libraries carry timeouts and retries.
Week 7Authentication and authorization
Who is calling versus what they may do, from authorization-code OAuth with PKCE and client credentials to opaque sessions and short-lived JWTs.
Week 7Security basics
TLS on the real path, least privilege, secrets kept out of images, and a one-paragraph threat model that catches injection and SSRF.
Week 7 · AdvancedMulti-region design
Active-passive failover, the conflicts active-active writes create, and how RPO, RTO, and residency decide the question.
Week 7 · AdvancedCell-based architecture
A cell is a full slice of the stack for a subset of users, so one tenant's failure stays inside a blast radius you chose.
Modern systems
Inference, retrieval, agents, edge, lakehouse, and the bill.
Serving LLMs
How GPU memory and the KV cache decide whether prefill and decode can share a batch, including when a long prompt does not fit.
Week 8Retrieval-augmented generation
How chunking, retrieval, and generation fail separately, and why the vector store is not the source of truth.
Week 8Vector search
Why exact nearest neighbors die at scale, how a layered graph searches, and why a tenant filter has to limit the walk.
Week 8Agents and tool calling
How a model, tool, and observation loop stays safe when a tool that charges can time out and run twice.
Week 8Serverless and the edge
Why scale-to-zero fights connection pools and local state, and why the edge should authenticate, redirect, and shape cache keys.
Week 8The lakehouse
How snapshots and manifests keep readers off a half-written drop, and when a lakehouse is the wrong tool.
Week 8Cost-aware design
Why three replicas kept for thirty days store ninety days of ingest, and how egress, caches, and idle spares move the bill.
Case studies
Interview designs with a budget, a diagram, and a way to fail.
Design a URL shortener
How a read-heavy short link redirects, counts a click, mints a key, and stays up when one link is suddenly most of the traffic.
Week 9Design a rate limiter
Where a token bucket should sit, when the counter has to be shared, and how a race on that counter admits more than the limit.
Week 9Design a key-value store
A leaderless key-value design with a hash ring, a quorum of three, hinted handoff, and a conflict rule you can explain without reimplementing a paper.
Week 9Design a unique ID generator
How to mint unique ids with a ticket range, a random identifier, or a 64-bit snowflake-shaped value, without a consensus round per id.
Week 9Design a news feed
Why a news feed fans out on write for ordinary people, fans out on read for celebrities, and treats that split as the design.
Week 9Design a chat system
A chat system that stores each message before fanout, orders it inside one conversation, and recovers when a gateway dies mid-send.
Week 9Design a notification system
How notifications cross in-app, email, and push with preferences, a queue, retries, and idempotency, without promising exactly-once delivery.
Week 9Design a web crawler
How a crawler spends a fixed fetch budget on fresh pages versus new pages, stays polite per host, and dedups URLs.
Week 10Design search autocomplete
A typeahead that stores the top suggestions on a prefix node, caches the hottest prefixes, and admits the index lags new queries.
Week 10Design video streaming
Playback is a small control decision plus immutable bitrate rungs cached at the edge, with the player choosing the rung as bandwidth moves.
Week 10Design a file sync service
Chunked files live as objects, the tree lives in a database, identical chunks are stored once, and two offline edits become a conflict.
Week 10Design nearby search
Nearby search looks up a geohash cell and its neighbors, ranks survivors by real distance, and drops points whose timestamps have gone stale.
Week 10Design ride matching
Ride matching treats location as a fast update and the assignment as a conditional write that cannot give one driver two trips.
Week 10Design a distributed message queue
A log-backed queue stores an ordered partition, tracks a consumer-group offset as the ack, and parks poison records so one crash cannot block the log.
Week 10Design a payment system
A payment charges once under an idempotency key, records ledger entries, notifies through an outbox, and reconciles when the provider times out.
Week 10Design ad click aggregation
Click aggregation takes a firehose, drops duplicate click ids, buckets by event time, and keeps the raw log in a different store from the counts.
Week 11Design a metrics system
How to ingest counters and histograms, reject high-cardinality labels, roll old data up, and keep a metrics outage off the product path.
Week 11Design hotel reservation
How to hold a room, expire the hold, and stop two guests from taking the last one, including the write skew snapshot isolation still allows.
Week 11 · AdvancedDesign a stock exchange
A single matcher per symbol, price-time priority, and a sequence number, plus the multicast and co-location questions that make this the advanced track.
Week 11Design ticket sales
How a ticket sale survives the on-sale minute with a waiting room, a hold that expires, and inventory that cannot be sold twice.
Week 11Design a leaderboard
A sorted structure for a top-ten board, why sorting on every read fails at large N, and why a stale cache crowns the wrong player.
Week 11Design an LLM chat service
A streaming chat service built from prefill and decode, stored transcripts, optional retrieval, idempotent tools, and evals, with cost counted in memory and steps.
Week 11Design a job scheduler
A scheduler that runs each job at least once, leases it so two workers cannot both claim it, and shards the schedule so one process is not permanent.
Production stories
What published systems actually did, and which idea is worth keeping.
Amazon Dynamo
How the 2007 Dynamo paper keeps a shopping cart writable during a partition, and why that system is not the later product DynamoDB.
Week 12Google Bigtable
Bigtable's 2006 design is a sparse sorted map of row, column, and timestamp, split into tablets with a log and SSTables on GFS.
Week 12MapReduce
MapReduce is the 2004 batch system that maps files to key-value pairs, groups by key, and reduces each group to output files on GFS.
Week 12Discord's message store
Discord stored messages by channel and time bucket on 177 nodes that held trillions of messages at the start of 2022.
Week 12How Netflix streams
The published Netflix design keeps OSS-era control services in AWS and serves encoded video from Open Connect appliances near viewers.
Week 12Stripe idempotency
Stripe stores an Idempotency-Key with its outcome for about a day, fingerprints the parameters, and resumes foreign calls from recovery points.
Week 12Facebook's memcache
The 2013 memcache paper's lookaside cache uses leases, a gutter pool, and write invalidation, which is a different story from mcrouter.
Week 12Cloudflare outages
Three Cloudflare incidents where one change went global, and why the control plane has to outlive the data plane it broke.
Week 12Figma multiplayer
How Figma lets several people edit one file by making the server the orderer, per property, without building a CRDT.
Week 12Facebook TAO
TAO is Facebook's graph cache in front of MySQL, with objects, stored inverse edges, and follower caches ahead of a leader.
Week 12Uber Schemaless and Ringpop
Schemaless is Uber's sharded MySQL trip store, and Ringpop is a separate gossip and hash-ring library for the app tier.
Week 12Slack's real-time path
Slack persists a message before the websocket broadcast, shards by channel, and keeps the live fanout in memory on a consistent-hash ring.
Week 12 · AdvancedGoogle Spanner
Spanner buys external consistency with a TrueTime interval and a commit wait, so naming the product does not finish a design.
Interview
How a 45-minute round is graded, and how to practice.