Skip to content
Skein

distributed

Distributed Systems

What goes wrong when one system runs across many machines — and how they agree, stay available, and avoid making outages worse. Advanced; comfortable with one backend first.

9 units·46 lessons·~41 h

Start track →
00

Start from zero

Before the senior material: what a distributed system even is, and the handful of words the rest of the track assumes you already know.
01

Cap practice

Roadmap

CAP in practice: consistency vs availability during inevitable partitions

Network partitions are inevitable. The only choice you get is to trade off consistency (correctness) against…

Funding: 48% ETA: when funded Back this unit →
02

Raft consensus: leader election, log replication, and production operations

How three to seven machines agree on exactly one ordered log — leader election, AppendEntries, quorum commits, pre-vote, snapshots, and the ops discipline that keeps a Raft cluster alive in production.
03

Quorum

Roadmap

Quorums: the R + W > N invariant and how it quietly breaks

A quorum is a tunable promise: if read replicas and write replicas overlap (R + W > N), a read sees the latest write.…

Funding: 54% ETA: when funded Back this unit →
04

Leader election

Roadmap

Leader election: one writer, terms, and the split-brain that fencing tokens stop

A single leader serializes writes so a cluster avoids conflicts — but a GC pause or partition can leave two nodes both…

Funding: 35% ETA: when funded Back this unit →
05

Clocks

Roadmap

Time and ordering: why wall-clock timestamps lie

Across a fleet, wall clocks drift and jump backward on NTP sync, so ordering writes by client timestamp silently drops…

Funding: 75% ETA: when funded Back this unit →
06

Sagas

Roadmap

Sagas: long-lived transactions across services without 2PC

When a workflow spans flight, hotel, and car services, you cannot hold one ACID transaction across all of them. A saga…

Funding: 37% ETA: when funded Back this unit →
07

Retry amplification

Roadmap

Retry amplification: how 3 retries per layer becomes a metastable outage

A naive retry on every layer of a deep call chain multiplies load geometrically — one request becomes 3^depth backend…

Funding: 35% ETA: when funded Back this unit →
08

Putting it together

Roadmap

Putting it together: an order pipeline where the seams leak

Each distributed primitive — quorum, leader election, clocks, sagas, retries — is correct alone. The capstone is wiring…

Funding: 57% ETA: when funded Back this unit →

Build with this track

Guided projects that exercise what you learn here.

◆ Projects

At-least-once job queue

Build a durable job queue on Postgres with visibility timeouts and idempotent consumers, so a crashed worker never drops a job.

◆ Projects

Circuit breaker

Build a circuit breaker that stops hammering a failing dependency, probes it safely with a half-open state, and resets automatically — the exact pattern that keeps microservice cascades from turning one bad node into a full outage.

◆ Projects

Collaborative cursors

Show every connected user's live cursor and selection in a shared document, conflict-free, over WebSocket.

◆ Projects

Consistent hashing ring

Build a virtual-node hash ring that remaps only the minimum set of keys when a node joins or leaves — the foundational primitive behind Dynamo, Cassandra, and every sharded cache that must survive node churn without a full reshuffle.

◆ Projects

Job scheduler

A cron + backoff job runner with at-least-once delivery, idempotent handlers, and visibility timeouts — so no job is silently lost even when workers crash mid-execution.

◆ Projects

Offline PWA sync

Offline-first notes PWA: a local write queue (IndexedDB) that syncs on reconnect with last-writer-wins conflict resolution, a service worker for asset caching, and background sync for missed flushes.

◆ Projects

Distributed rate limiter

Build a token-bucket limiter that holds across many app instances by keeping the counter in Redis, not in process memory.

◆ Projects

Union-Find (Disjoint Set Union)

Build a disjoint-set structure from a naive parent array up to near-constant amortized time — then use it to drive Kruskal's MST algorithm on a weighted graph.

◆ Projects

Crash-safe key-value store with a WAL

Build a tiny on-disk KV store that survives a kill -9 mid-write by appending to a write-ahead log before touching the main file.

Next track

Security

The ways real apps get attacked and how to defend them — safe login and sessions, validating input, and the common mistakes that leak data.