Data Systems from the Inside

Reason about any database

Why a database is fast, where it breaks, and which one to pick. You start with a single file on a single disk and end with a database spread across datacenters.

One disk

After this stage you can explain why a write-heavy and a read-heavy database are built differently.

One machine, many users

After this stage you can read an EXPLAIN plan and say why a query is slow.

Many machines

After this stage you can say what a system gives up when it survives a machine dying.

A leaderless database, end to end

After this stage you can decide whether Cassandra fits a workload and model the tables if it does.

  1. What Cassandra Is and Why It Exists — What is Cassandra for, and what did it give up to get there? (17 min read)
  2. Cluster Topology and Data Distribution — How does a cluster with no boss decide where each row lives? (35 min read)
  3. Replication and Consistency, in Plain English — How do copies of the same row drift apart, and get back in step? (12 min read)
  4. Replication and Consistency — How many replicas must answer before you believe them? (25 min read)
  5. Write Path Internals — Why is every write an append? (12 min read)
  6. Anatomy of a Memtable — What does a row actually look like while it is still in memory? (12 min read)
  7. The LSM Tree and the Wide Row — Where does one partition physically live on disk? (18 min read)
  8. Read Path Internals — What does a read have to stitch back together? (18 min read)
  9. Compaction — Who pays for all those appends, and when? (10 min read)
  10. Data Modeling — Why do you design the table from the query backwards? (15 min read)
  11. Lightweight Transactions and ACID — How do you get compare-and-set from a database with no leader? (11 min read)
  12. When to Use Cassandra and When Not To — When is Cassandra the wrong answer? (15 min read)
  13. Operations a Staff Engineer Must Understand — What does it take to keep a cluster healthy at 3 a.m.? (14 min read)
  14. Setting Up Cassandra for Each Canonical Use Case — What do real Cassandra setups look like, workload by workload? (18 min read)