Learn
Subject · Learn library

System Design

Every decision a system designer makes that has a number attached, taught as that number: capacity from rates and retention, latency from distance and round trips, waiting from utilisation and variability, availability as a product of probabilities, replication as lag and overlap, partitioning as balls into bins, storage as I/O counts, scaling as a ceiling, and measurement as the arithmetic that tells you whether any of it is true. Ten courses and 114 lessons are available.

L = λW an identity about a trace, not a model W = S/(1 − ρ) 0.9 → 0.99 multiplies the wait by 10 P(all n calls ≤ their p99) = 0.99ⁿ one half at n = 69 A = ∏Aᵢ series A = 1 − ∏(1 − Aᵢ) parallel, given independence h(C) = H_{C,s} / H_{N,s} a small cache of a skewed workload R + W > N ⟹ every read set meets every write set
Courses
10
Lessons
114
Level
Intermediate → Advanced
Assumes
discrete probability and algebra are assumed

Overview

Capacity Estimation comes first because every later number begins as a rate. A reader who cannot turn ten million users into requests per second, with an error bar they can defend, cannot start any of the nine courses that follow — and the habit of carrying the error bar is the course’s real content.

Latency and the Tail precedes Queues and Utilisation because queueing is the explanation and the tail is the thing explained. Percentiles, fan-out amplification and the convolution of two stages have to exist as objects before “why is the p99 like that” is a question with an answer.

Caching, Availability, Replication and Partitioning are four applications of the same probability, in increasing order of what they add: conditional hit rates, then binomials and products, then order statistics, then balls into bins. Each could stand alone; in this order each one’s new tool is the only new thing in it.

Storage Engines, Scaling Laws and Cost, and Measuring Systems come last because each consumes numbers from all of the others. A page cache is the cache of Caching and Hit Rates, a shard count is the machine count of Capacity Estimation under two constraints, and the last course asks the question the whole path has been deferring: how would you know any of this from a system that is running?

Courses

Each course assumes the ones before it and the two prerequisite paths, and nothing else. Latency and the Tail supplies the percentile vocabulary that Queues and Utilisation explains the origin of; Caching, Availability, Replication and Partitioning are four applications of one probability toolkit, each adding a single tool; Storage, Cost and Measuring consume numbers produced by all of the others.

Capacity Estimation

Ten million users, a hundred actions a day, a kilobyte each: how much machine is that? The course teaches estimation as arithmetic with error bars — every factor is a range, every product is a wider range, and an estimate that arrives as a single number is hiding its width. It ends by checking an estimate the only honest way, by a second route that shares no assumption with the first.

10 lessonsIntermediate
Latency and the Tail

A request is slow for one of four reasons — it went far, it went back and forth, it waited for the slowest of many, or it was the unlucky one in a hundred — and each has a number. The course puts a floor under latency with the speed of light, counts round trips, computes percentiles by rank, and builds the budget that a timeout and a retry have to fit inside.

11 lessonsIntermediate
Queues and Utilisation

Why a server at 80% is nearly full, in numbers. The course opens with the one law that needs no assumptions — L = λW, proved on a trace by counting — builds the exponential and Poisson distributions as limits of the geometric and binomial you already have, derives M/M/1 by flow balance, and ends with the four controls a designer actually has: fewer queues with more servers, less variance, a bounded buffer, and a token bucket.

13 lessonsAdvanced
Caching and Hit Rates

A cache is a number — the miss rate — and every decision about it is arithmetic on that number: what it does to the backend, what it does to the average and to the tail, how big the cache must be given how skewed the requests are, how stale it is allowed to be, and what happens in the second after a hot key expires.

10 lessonsIntermediate
Availability and Failure

Nines are a fraction, and everything else in this course is what happens to that fraction under composition: chains multiply it down, redundancy multiplies it up but only if the failures are independent, retries multiply load exactly when the system can least afford it, and three copies of a file are safe in proportion to how fast a lost copy is replaced. Every claim is a probability you compute.

13 lessonsIntermediate
Replication and Consistency

Replication is bought in three currencies — write work, latency and staleness — and the course prices each. Reads scale by N and writes do not; a synchronous write waits for the slowest replica and a quorum for the W-th fastest; a follower read is stale with a probability read off the lag distribution; and “consistency” becomes a count — of concurrent pairs in a vector-clock diagram, of valid linearizations of a history, of updates a last-writer-wins merge throws away.

13 lessonsAdvanced
Partitioning and Load Balancing

Splitting data or traffic across N nodes is a balls-into-bins problem, and the course measures it: how uneven a hash actually is, what fraction of keys move when N changes, what one hot key does to the hottest shard regardless of N, why sampling two bins beats one so dramatically, and what a query that must visit every shard costs.

12 lessonsAdvanced
Storage Engines and Indexes

Every storage engine is a bargain between reads, writes and space, and the bargain is countable: seeks against bytes, tree levels against fanout, bytes rewritten per byte ingested, bits per key for a Bloom filter, fsyncs per second. The course prices each structure so that “use an LSM” or “add an index” becomes a number a designer can defend.

11 lessonsIntermediate
Scaling Laws and Cost

Adding a machine buys less than a machine’s worth, and sometimes less than nothing; paying for capacity buys more than you use, by a ratio you can compute. The course fits Amdahl’s ceiling and the Universal Scalability Law’s peak, prices batching, reserved capacity, autoscaling lag and storage tiers, and closes with two transfer break-evens.

11 lessonsIntermediate
Measuring Systems

Every earlier course produced a number; this one asks how you would know it from a live system, and shows the four ways the measurement lies: percentiles that were averaged, histograms with wide buckets, load generators that skipped the slow requests, and scrape intervals that never saw the spike. It ends with the arithmetic of sampling, cardinality, load-test length and alerts.

10 lessonsAdvanced

Recommended background

Algebra through Sequences and Series, and Discrete Mathematics through Algorithms and Complexity. Specifically: scientific notation, logarithmic scales, geometric series and asymptotes from Algebra; independence, conditional probability, expectation, variance, the binomial and geometric distributions, combinations, partial orders, modular arithmetic and the seeded generator from Discrete Mathematics. Each course names the slugs it uses.

No calculus and no continuous probability. Where this path needs the exponential or the Poisson distribution it builds them as limits of the geometric and the binomial you already have, and no lesson writes a density or an integral.

No programming and no operational experience. The labs run the models for you; nothing asks you to write code, configure a service or have carried a pager.

Willingness to distrust a number you just computed. The arithmetic on this path is easy, and every wrong answer in it comes from an assumption — independence, memorylessness, a steady state — that was true of the model and not of the system.