all_lessons / data_intensive_systems / 00 · orientation lesson 1 / 35 · ~12 min

Orientation · how to read this track

Orientation: the spine and "Where is truth?"

The neighboring tracks on this site assume the substrate: backend system design picks Postgres or Cassandra and moves on; the data-engineering track builds pipelines on top of a log it does not open; the ML-systems track trains on a feature store and serves from a vector index as if those were primitives. This track is the layer underneath all three. It opens the box. By the end you should be able to look at any of those products — a database, a queue, a cache, a search index, a feature store, a vector DB — and see the same handful of moves: which facts are authoritative, which reads are cheap, which writes are cheap, how much machines must agree, and what breaks when one of them dies.

Book source
Original synthesis inspired by Martin Kleppmann, Designing Data-Intensive Applications — the Preface and the three Part introductions (Foundations, Distributed Data, Derived Data), updated and resequenced for the 2nd-edition material. This track reorders the book's arc into a single linear spine; later lessons cite the specific chapters. We do not reproduce DDIA's prose or figures.
Linear position
Prerequisite: You can read a SQL query, you know a process can crash and a network packet can be lost, and you have a hand-wave model of a hash table and a B-tree. No distributed-systems background is assumed — every term (quorum, replication lag, linearizability, fencing token, CDC, watermark, materialized view) gets defined at its home lesson.
New capability: You can place any storage or messaging product into one design space, name the single contract it offers, predict the bill it sends elsewhere, and answer one question about it — where is truth? — so the rest of the track reads as derivations, not a parade of products.
The plan
Four moves. (1) Define what makes an application data-intensive, and draw the one picture the whole track elaborates: a source of truth that spawns derived views through a change log. (2) Present the Linear Spine — a single truthful copy, pressured eleven steps in a row, plus an applied part — and show why the order is forced, not arbitrary. (3) Teach the one reading habit that makes the rest cheap: every mechanism is a contract bought at a cost charged somewhere else — name the constraint before the tool. (4) Introduce the recurring "Where is truth?" artifact that closes every lesson, and hand off to lesson 01.

1 · What "data-intensive" means, and the one picture

An application is compute-intensive when its hardest problem is doing arithmetic fast — a physics simulation, a renderer, a training loop's matmuls. It is data-intensive when CPU is rarely the bottleneck and the hard problems are instead the amount of data, the complexity of the data, and the speed at which it changes. Almost every product you ship is the second kind. The difficulty is not computing an answer; it is storing facts durably, moving them between machines, interpreting them consistently as schemas drift, and getting many machines to agree on them when some are slow or dead.

Strip a data-intensive system to its skeleton and you always find the same shape. There is a system of record — the authoritative copy of the facts, the one you would rebuild everything else from after a disaster. Then there are derived views: copies shaped for a specific read pattern (a search index for full-text queries, a cache for hot keys, an analytics table for aggregation, an embedding index for similarity, precomputed features for a model). Derived views are never authoritative; they are functions of the system of record, kept in sync by a flow of changes. That flow — the change log — is the spine of the entire track.

WRITE (a new fact) | v +--------------------------+ | SYSTEM OF RECORD | the one authoritative copy | (durable, transactional) | — survives crashes, is the truth +--------------------------+ | change log (an ordered, durable stream of every change) | +---------------------+---------------------+-----------------+ v v v v +-----------+ +-------------+ +-------------+ +---------------+ | SEARCH | | CACHE | | ANALYTICS | | ML FEATURES / | | INDEX | | (hot reads) | | COLUMNAR | | VECTOR INDEX | +-----------+ +-------------+ +-------------+ +---------------+ DERIVED VIEW DERIVED VIEW DERIVED VIEW DERIVED VIEW invariant: every derived view is a CACHE of the system of record. if you cannot recompute it from the log, you cannot trust it.

Read that diagram as a promise and a hazard. The promise: each derived view gets exactly the layout its reads want, so each read is cheap. The hazard: the moment there is more than one copy, they can disagree — a view can lag, drop a change, or apply one twice — and now "what is true?" has more than one answer. Every later lesson is either (a) making one copy faster, safer, or more durable, or (b) keeping the copies honest with each other. Hold onto the rule on the last line: a derived view you cannot recompute from the log is not a view, it is a second source of truth you forgot you had.

2 · The Linear Spine: one truthful copy, pressured step by step

This track is one long argument, not a list of topics. It starts from the simplest correct system imaginable — one machine, one database, one copy of every fact, every operation a local transaction — where nothing is stale, nothing disagrees, and "what is true?" has exactly one answer. Then it applies pressure to that single truthful copy, one step at a time, and watches a region of the design space open up at each step. That ordered sequence of pressures is the spine. Each step is realized by one or two lessons; the order is the order of least new assumptions per step, because the dependencies are real — you cannot reason honestly about replication before you know what a durable log is, and you cannot reason about linearizability before you have felt replication lag.

ONE TRUTHFUL COPY ──────────────────────────────────────── the source of truth │ ┌──────────┴───────────────────────────── pressures on the copy ───────────────────────────┐ │ │ (1) MODEL IT shape, storage, invariants .................. L01 L02 L03 L04 │ (2) LET IT AGE schemas, compatibility, migrations ........... L05 │ (3) MEET DEMAND indexes, caches, SLOs, tail latency .......... L06 L07 │ (4) ADD REDUNDANCY replication, lag, local-first sync ........... L08 L09 L10 │ (5) DISTRIBUTE IT sharding, tenants, request routing .......... L11 L12 │ (6) HOLD INVARIANTS transactions, messaging, workflows ........... L13 L14 │ (7) SURVIVE FAILURE clocks, leases, partitions, consensus ........ L15 L16 L17 │ ┌──────────────── now the copy spawns derived state ───────────────┐ │ │ (8) DERIVE HISTORY logs, CDC, batch, stream .................... L18 L19 │ (9) DERIVE VIEWS warehouse, search, vector, features, models .. L20 L21 L22 L23 │ (10) GO CLOUD / AI managed services, object stores, RAG, MLOps .. L24 │ (11) ANSWER SOCIETY audits, privacy, fairness, accountability .... L25 L26 │ ════════════════ PART 12 · APPLIED & INTERVIEWS ════════════════════ production atlas, failure/drill lab, six interview cases ...... L27 .. L34

The same eleven steps, named precisely, with the lessons that realize each:

1 · A single truthful copy
Model, storage, and invariants of one authoritative copy. Data models (L01), query languages and access patterns (L02), storage engines I — logs, hash indexes, B-trees (L03), storage engines II — LSM-trees and columnar (L04).
2 · Meaning over time
The copy must stay readable as the software around it changes. Encoding, schemas, compatibility, and migrations (L05) — a write today still parsed next year, old and new code reading each other mid-deploy.
3 · Demand
Make reads and writes meet a latency budget. Reliability, scalability, SLOs, and tail latency (L06); indexes, caches, and serving under demand (L07).
4 · Redundancy
More than one copy, for throughput and survival. Replication I — leaders, followers, lag, failover (L08); replication II — quorums, leaderless, conflicts (L09); local-first and offline sync (L10).
5 · Distribution
The data outgrows one machine. Partitioning, hot keys, and rebalancing (L11); multitenancy, request routing, and sharding operations (L12).
6 · Invariants under concurrency
Keep promises while many writers race. Transactions and isolation (L13); messaging, idempotency, and the transaction boundary (L14).
7 · Failure
The ugly truth of partial failure. Clocks, leases, fencing (L15); consistency, causality, linearizability (L16); consensus, coordination, and verification (L17).
8 · Derived history
Turn the change log into reusable history. Batch processing — dataflow, joins, recompute (L18); stream processing — logs, CDC, windows, stream joins (L19).
9 · Derived views
Many shapes of the same facts, kept correct. Derived-data correctness (L20), analytics and query-execution internals (L21), search/vector indexes and RAG (L22), feature stores and ML pipelines (L23).
10 · Cloud / AI systems
The substrate as a managed service. Cloud-native storage as a subsystem — managed databases, object stores, RAG, and ML pipelines on rented infrastructure (L24).
11 · Correctness & society
Correctness includes the obligations the system owes people. Law, regulation, and ethics as architecture input (L25); current DDIA — what the 2nd edition adds (L26).
12 · Applied & interviews
Spend the vocabulary. Production systems atlas (L27), failure timelines and quantitative drills (L28), and six full senior-interview cases — social timeline, global profile store, feature store, search index without dual writes, model registry, metrics dashboard (L29–L34).

Every named product is just a point — or a path — through this spine. A single-node Postgres lives at step 1 and pays nothing for distribution while buying clean transactions (L13). Cassandra trades those clean transactions for leaderless quorum replication that survives node loss (L09). Kafka is the change log itself, promoted to a first-class durable object (L19). A vector index for RAG is a derived view (step 9) whose freshness is a stream-processing question (L19) and whose recompute is a batch question (L18). You will not memorize these verdicts; you will be able to re-derive them from where each product sits on the spine.

If you only have time for the load-bearing steps: L03 (the durable ordered log, the object the whole track keeps reusing), L08 (replication lag — the first place "more than one copy" hurts), L16 (linearizability — the strongest single-copy illusion and what it costs), and L20 (how derived views stay correct end to end). The other lessons earn those four.

3 · The one reading habit: contract bought at a cost

Here is the single mental move that makes the rest of the track cheap. Every mechanism is a contract bought at a cost charged somewhere else. There is no free win; there are only relocations of cost. When you meet a new mechanism, ask three questions in this order — and refuse to name the tool until you have answered the first:

1What constraint forces this? A workload number (writes/sec, bytes/record, fan-out), an invariant (no double-spend), a failure model (must survive one rack dying), or a freshness SLA. Name the constraint before the tool — tools are conclusions, not opening moves.
2What contract does it offer? "Reads see the latest write." "A write is durable before I acknowledge it." "Two machines never disagree on the leader." This is the promise, stated precisely enough to test.
3Where is the bill? The cost never disappears — it moves to read latency, write latency, storage, availability during a network partition, freshness, or human operational complexity. If you cannot point at the bill, you have not understood the mechanism.

The trade-off table below is the same habit applied to the corners of the spine. Each row is a contract and its bill; the rest of the track fills in the mechanics behind each.

ChoiceBuys (contract)Costs (the bill)
One database (no distribution)One source of truth, clean local transactions, nothing can disagreeBounded by one machine's capacity and one failure domain; one layout must serve every read
Replicate the dataRead throughput and availability — a copy survives a node lossReplication lag: copies disagree for a window, so reads can be stale (L08)
Strong coordination (consensus, linearizability)A single global order; the system behaves like one machineLatency on every operation and reduced availability during a partition (L16–L17)
Asynchronous derived viewsFast writes, decoupled systems, each read pattern gets its own cheap layoutReaders see stale or partially-updated views; cross-system correctness becomes the hard problem (L18–L20)

A worked instance to make the habit concrete. Suppose a feature store serves 50,000 reads/sec to an online ranker with a 10 ms p99 budget, and a single primary database tops out at 20,000 reads/sec. The constraint is read throughput (2.5× over capacity) under a tight latency tail. The tool is read replicas: add four followers and you have 5 × 20,000 = 100,000 reads/sec of headroom, well inside budget. The contract is "more read capacity, and a copy survives a primary crash." The bill arrives as replication lag: if a follower is 200 ms behind the primary, a user who just updated their profile and is re-ranked immediately may be scored on yesterday's feature. That single number — 200 ms of staleness — is the price of the throughput, and L08 is where you decide whether you can pay it or must route that one read to the primary (read-your-writes). You bought a contract; the bill landed on freshness. That is the whole track in one example.

4 · The recurring question: "Where is truth?"

The spine has exactly one organizing question, and it is concrete enough to answer for any mechanism you meet: where is truth, and what is merely a copy of it? Every lesson in this track ends with a small box that answers that question for the mechanism it just taught. The box names eight things, and naming them is the single most reliable way to find the bug before it ships.

What the box names, every time

  • System of record — the one authoritative copy you would rebuild everything else from.
  • Copies / derived views — every other copy of these facts, and whether each is recomputable from the log.
  • Freshness budget — how stale a copy is allowed to be (a lag in ms, a window, "eventual").
  • Owner — the team or service accountable for the record and for keeping the views honest.
  • Deletion path — how a fact is truly removed everywhere, including every derived view (the GDPR question).
  • Reconciliation / repair path — how a drifted copy is brought back into agreement (re-sync from log, anti-entropy, rebuild).
  • Evidence it is correct — the check that proves the copies agree (checksums, row counts, audit, replay).

How to read every later lesson

  • Name the constraint (workload number / invariant / failure model / freshness SLA) before naming any tool.
  • State the contract the mechanism offers as a testable promise.
  • Locate the bill: read latency, write latency, storage, availability under partition, freshness, or operational complexity.
  • Then fill in the "Where is truth?" box — if you cannot name the system of record and the repair path, you do not yet understand the mechanism.
  • Watch which step of the spine the lesson is answering, and which new pressure its answer exposes.

To anchor the artifact, here is the box for the orientation itself — the picture from §1, read as a "Where is truth?" answer. Every lesson's box has this exact shape, specialized to its mechanism.

Where is truth?
System of record: the authoritative, durable, transactional copy of the facts — the one you rebuild everything from after a disaster.
Copies / derived views: the search index, cache, analytics table, feature store, and vector index — each a function of the record, each must be recomputable from the change log.
Freshness budget: set per view by its read pattern — a cache may tolerate seconds, an online feature may demand a tight lag, an analytics rollup may be hourly.
Owner: the team that owns the system of record owns its truth; each derived view has an owner accountable for keeping it honest with the record.
Deletion path: a delete on the record must propagate through the change log to every view, or a "deleted" fact survives in a cache or index — the failure that becomes the privacy lessons (L25).
Reconciliation / repair path: rebuild any view by replaying the change log from the record; a view that cannot be rebuilt this way is a hidden second source of truth.
Evidence it is correct: you can recompute each view from the log and get the same bytes — replay, checksum, or recount. If you cannot, you do not actually know it is correct.

Checkpoint exercise

Try it
Take a RAG product: documents are ingested, embedded, and stored in a vector index; user queries retrieve nearby chunks; a model answers. (1) Fill in the "Where is truth?" box: which store is the system of record, which are derived views, what is each view's freshness budget, and what is the deletion path when a document is removed? (2) For the vector index, name the constraint that justifies it, the contract it offers, and the bill (which of read/write/storage/freshness/availability does it charge?). (3) Could you fully recompute the index from the system of record if it were lost? If the answer is "no," you have found a hidden second source of truth — name it.

Where this points next

We have the spine, a reading habit, and the one question that ties them together. But the very first step of the spine — "a single truthful copy" — hides a choice that quietly decides which later promises are cheap to keep: the shape you force your data into. Lesson 01 builds the three dominant shapes — relational, document, and graph — by modeling the same domain three ways and watching which queries get cheap and which become network-bound joins or fan-out writes. That is where the copy stops being an abstraction and acquires a structure you will live with for the rest of the track.

Takeaway
A data-intensive system's hard problems are storing, moving, interpreting, and agreeing on data — not computing. Strip any such system down and you find one shape: an authoritative system of record spawning derived views through an ordered, durable change log, with the iron rule that any view you cannot recompute from the log is a hidden second source of truth. This track is one long argument — the Linear Spine — that takes that single truthful copy and applies pressure to it eleven steps in a row: model it, let it age, meet demand, add redundancy, distribute it, hold invariants under concurrency, survive failure, then derive history, derive views, go to the cloud, and answer to society — closing with an applied part of atlas, drills, and six interview cases. Read every lesson with one habit and one question: name the constraint before the tool, state the contract, locate the bill — and then answer "Where is truth?": the system of record, the copies, the freshness budget, the owner, the deletion path, the repair path, and the evidence it is correct. Nothing is free; there are only relocations of cost.

Interview prompts