Systemsfor Aravinda
0 / 78 core

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.

Fundamentals

Latency, estimation, and the path a request actually takes.

Storage

How data is laid out, copied, split, and protected.

Week 2

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.

2.5 h
Week 2

Indexes: 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.

2.5 h
Week 2

Replication

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.

2.5 h
Week 2

Partitioning 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.

2.5 h
Week 3

Transactions and isolation

What atomicity, invariants, isolation, and durability promise, and how snapshot isolation still double-books the last seat.

3 h
Week 3

Caching

Cache-aside, write-through, and write-back, and what a hot product page does to the database at the moment the key expires.

2.5 h
Week 3

Object storage

Immutable blobs behind a metadata pointer, why that is not a filesystem, and why video bytes do not belong in a database row.

1.5 h
Week 3

Search indexes

An inverted index maps terms to postings, lags the primary store, and only starts its ranking at term frequency.

2 h
Week 3

Time-series data

Append-mostly metrics from many hosts, compressed and downsampled, and the memory blowup when a user id becomes a label.

1.5 h

Distributed systems

What stays true when machines fail and messages arrive late.

Messaging

Moving facts between services without pretending the network is a function call.

Reliability

Limits, signals, and the difference between a slow system and a dead one.

Architecture

Where the boundaries go, and who is allowed to cross them.

Modern systems

Inference, retrieval, agents, edge, lakehouse, and the bill.

Case studies

Interview designs with a budget, a diagram, and a way to fail.

Week 9

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.

1.5 h
Week 9

Design 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.

1.5 h
Week 9

Design 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.

2 h
Week 9

Design 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.

1 h
Week 9

Design 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.

2 h
Week 9

Design 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.

2 h
Week 9

Design a notification system

How notifications cross in-app, email, and push with preferences, a queue, retries, and idempotency, without promising exactly-once delivery.

1.5 h
Week 9

Design a web crawler

How a crawler spends a fixed fetch budget on fresh pages versus new pages, stays polite per host, and dedups URLs.

1.5 h
Week 10

Design search autocomplete

A typeahead that stores the top suggestions on a prefix node, caches the hottest prefixes, and admits the index lags new queries.

1.5 h
Week 10

Design 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.

2 h
Week 10

Design 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.

2 h
Week 10

Design 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.

1.5 h
Week 10

Design ride matching

Ride matching treats location as a fast update and the assignment as a conditional write that cannot give one driver two trips.

2 h
Week 10

Design 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.

2 h
Week 10

Design 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.

2 h
Week 10

Design 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.

1.5 h
Week 11

Design 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.

2 h
Week 11

Design 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.

1.5 h
Week 11 · Advanced

Design 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.

2 h
Week 11

Design 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.

1.5 h
Week 11

Design 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.

1.5 h
Week 11

Design 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.

2 h
Week 11

Design 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.

1.5 h

Production stories

What published systems actually did, and which idea is worth keeping.

Week 12

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.

1 h
Week 12

Google 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.

1 h
Week 12

MapReduce

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.

1 h
Week 12

Discord's message store

Discord stored messages by channel and time bucket on 177 nodes that held trillions of messages at the start of 2022.

1 h
Week 12

How Netflix streams

The published Netflix design keeps OSS-era control services in AWS and serves encoded video from Open Connect appliances near viewers.

1 h
Week 12

Stripe idempotency

Stripe stores an Idempotency-Key with its outcome for about a day, fingerprints the parameters, and resumes foreign calls from recovery points.

1 h
Week 12

Facebook's memcache

The 2013 memcache paper's lookaside cache uses leases, a gutter pool, and write invalidation, which is a different story from mcrouter.

1 h
Week 12

Cloudflare outages

Three Cloudflare incidents where one change went global, and why the control plane has to outlive the data plane it broke.

1 h
Week 12

Figma multiplayer

How Figma lets several people edit one file by making the server the orderer, per property, without building a CRDT.

1 h
Week 12

Facebook TAO

TAO is Facebook's graph cache in front of MySQL, with objects, stored inverse edges, and follower caches ahead of a leader.

1 h
Week 12

Uber 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.

1 h
Week 12

Slack'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.

1 h
Week 12 · Advanced

Google Spanner

Spanner buys external consistency with a TrueTime interval and a commit wait, so naming the product does not finish a design.

1.5 h

Interview

How a 45-minute round is graded, and how to practice.