Data-intensive systems, visualized
The ideas behind every database and data pipeline you will use, in the order they build on each other: how one machine stores data, how many machines share it, and how data flows between systems.
Each topic is a short story you can step through and pause. It follows the outline of Kleppmann's Designing Data-Intensive Applications, so it works as a companion to the book.
One machine: storage and encoding
How a database lays out data on disk, and how data changes shape over time.
- Latency Percentiles & Tail LatencySort real response times to read p50, p95 and p99, see why the mean misleads, and watch fan-out and queueing turn a rare slow request into a common slow pageBeginner, 10 min
- Relational Algebra & JoinsVisualize the mathematical foundations of SQL: Projections, Selections, and different types of JoinsBeginner, 15 min
- Query Languages & Data ModelsCompare a loop with a declarative query, a document with a shared row, a graph pattern, Datalog rules and a SPARQL triple query, each run step by step on a tiny data setIntermediate, 20 min
- NoSQL Database ModelsSee one e-commerce order reshaped as a document, a key-value pair, and a wide-column rowIntermediate, 16 min
- Hash Indexes & Append-Only LogsWatch writes append to a log, a hash map point at the newest record, segments compact, and the map rebuild after a crashIntermediate, 15 min
- B-Tree IndexesAn interactive visualization showing how databases use B-Trees to retrieve data in O(log n) time without scanning the full tableIntermediate, 20 min
- LSM-Trees & SSTablesWatch writes land in a memtable and a log, flush into sorted SSTables, get read newest-first with bloom filters, and merge during compactionIntermediate, 15 min
- Bloom FiltersInteractive visualizer for the Bloom Filter, a space-efficient probabilistic data structure used to save expensive disk readsAdvanced, 15 min
- Star Schemas & Data CubesJoin a fact table to its dimensions, see what snowflaking costs, and watch a data cube turn a scan into a lookupIntermediate, 15 min
- Column-Oriented StorageAnswer one analytics query from a row store and a column store, count the cells each reads, then compress a sorted column with run-length encodingIntermediate, 12 min
Many machines: replication and partitioning
Copies for safety and speed, slices for scale, and the bugs that live in between.
- Database Replication StrategiesExplore how databases stay in sync across multiple nodesAdvanced, 17 min
- Multi-Leader TopologiesSend writes around a ring, through a star and across an all-to-all meshAdvanced, 15 min
- Replication Lag AnomaliesSee read-your-writes, monotonic reads and consistent prefix break when followers lag behind the leader, then fix each oneIntermediate, 15 min
- Sloppy Quorums & Hinted HandoffCut a client off from two replicasAdvanced, 15 min
- Database ShardingExplore hash-based and range-based database sharding with visual data distribution across multiple nodesAdvanced, 20 min
- Consistent HashingUnderstand how distributed caches handle scaling without massive data remapping using a hash ringAdvanced, 20 min
- Secondary Indexes & RebalancingCompare local and global secondary indexes on partitioned data, then add a node and move whole partitions instead of rehashing every keyAdvanced, 15 min
Transactions
What isolation levels promise, and the anomalies each one lets through.
- ACID TransactionsExplore the four guaranteesIntermediate, 16 min
- Concurrency & DeadlocksStep through shared and exclusive locks, two-phase locking, what breaks when a lock is released early, and how a circular wait becomes a deadlockAdvanced, 15 min
- Isolation Levels & AnomaliesRun dirty reads, read skew, lost updates and write skew between two transactions, then watch read committed, snapshot isolation and serializable stop themAdvanced, 20 min
When the network and clocks lie
Partial failure, pauses, clock skew, and how to stay correct anyway.
- CAP TheoremVisualize the trade-offs between Consistency and Availability when a Network Partition occurs in a distributed systemIntermediate, 15 min
- Failure Detectors: Timeouts & Phi AccrualSee why a crashed node and a slow node look alike, how a short or long timeout fails, and how a phi accrual detector turns silence into a suspicion levelAdvanced, 15 min
- Unreliable Clocks & Fencing TokensSee a paused process wake up on an expired lease and corrupt data, how fencing tokens stop it, and how clock skew makes last-write-wins drop newer writesAdvanced, 15 min
- LinearizabilityWatch a replicated register return a value, then an older one, and see how quorum reads with read repair and compare-and-set make it act like a single copyAdvanced, 15 min
- Lamport & Vector ClocksStep through messages between three processes as Lamport and vector clocks tick, see which events are concurrent, and watch total order broadcast keep nodes in stepIntermediate, 15 min
- Leader Election (Raft)Visualize how distributed databases elect a Leader and recover from crashes using the Raft Consensus AlgorithmAdvanced, 20 min
- Raft Log ReplicationFollow a client write through the leader to a majority and commit, repair a follower that fell behind, and see an old leader’s uncommitted entries overwrittenAdvanced, 15 min
- Byzantine FaultsCompare a node that crashes with one that liesAdvanced, 12 min
- Distributed Transactions (Saga vs 2PC)Learn how microservices maintain data consistency across multiple databases using Two-Phase Commit and Saga patternsAdvanced, 20 min
Derived data: batch and streams
Turning one source of truth into indexes, caches and views that stay in sync.
- MapReduce & Batch ProcessingRun a word count and a join across mappers and reducers, watch the shuffle group keys, and see a failed task retried without changing the resultIntermediate, 15 min
- Pregel: Graph ProcessingRun graph jobs in supersteps: vertices read messages, update, send to neighbours, wait at a barrier, and vote to haltAdvanced, 15 min
- Kafka ArchitectureExplore the high-throughput, distributed event streaming architecture of Apache KafkaAdvanced, 20 min
- Change Data Capture & Event SourcingSee dual writes leave a search index out of sync, then fix it by feeding every copy from the database’s change log, and rebuild state by replaying eventsIntermediate, 15 min
- CQRS PatternVisualize the Command Query Responsibility Segregation pattern for separating read and write workloadsAdvanced, 20 min
- Stream Processing: Time, Windows & Exactly-OnceCount late, out-of-order events by event time, close one-minute windows with a watermark, and see why a crash double counts unless state and offset are saved togetherAdvanced, 20 min
- Stream JoinsMatch clicks with purchases inside a window, enrich a stream from a table kept fresh by a changelog, and see why a replay can change the answer unless the table keeps versionsAdvanced, 15 min
Doing the right thing
Collecting less, asking consent and deleting on request, as simple flows.
- Data Privacy: Minimise, Consent, DeleteFour short flows for handling personal data: collect less, tie each use to consent, delete a person's data from every derived copy, and expire old records automatically12 min
- Predictive Analytics and BiasTrain a loan model on biased past decisions and watch a stand-in column carry the bias, run a feedback loop where predictions shape their own data, and see the reasons a person is owed15 min