中文 →
The Pragmatic Engineer · 2026

Explain the trade-offs to others; keep the hard problems for yourself

Martin Kleppmann × Gergely Orosz · "Designing Data-intensive Applications with Martin Kleppmann"

Show The Pragmatic Engineer · 2026-04-22 · Length 86 min · Guest Martin Kleppmann · Host Gergely Orosz · Episode YouTube

The moment

An hour in, Gergely Orosz asks Kleppmann for an example of a hard engineering problem in local-first software. Kleppmann picks the one that sounds least like a problem: you share a document with a collaborator, then you want to take their edit access back. In a centralized cloud service, that is a single permission check. But what if there is no server whose word is final? A user's access is revoked, and at almost the same moment that user makes an edit. Some devices see the edit first and the revocation second, so they accept it; others see the revocation first and drop the edit. Those devices, Kleppmann says, are now "permanently inconsistent." [01:05:18]

Orosz reaches back to their earlier talk about clocks: if every device had a perfectly synchronized clock, couldn't you just order things by timestamp? Kleppmann's answer takes the problem one level deeper.

So, relying on clocks is absolutely useless here because people can forge the timestamps from those clocks and thereby then potentially undermine the access control mechanism.— Martin Kleppmann · [01:07:39]

A revoked user who wants to vandalize the document only has to backdate the edit. That one exchange holds both undercurrents of the episode: the "trouble with distributed systems" chapter of his book, and the kind of problem he now chooses to work on precisely because commercial companies mostly won't.

Who's talking, and when

Kleppmann's second startup, Rapportive, was a Gmail extension that showed a stranger's photo, job title and latest tweets next to their email. It went through Y Combinator, moved to San Francisco, and sold to LinkedIn in 2012 with five people on staff. He says they were nearly out of money and had failed to raise another round; worse, they couldn't even cut their own salaries, because that would have violated the terms of their work visas. Given how little leverage they had, he is happy with how it ended.

At LinkedIn he moved to Samza, a stream processing framework built on Kafka. Jay Kreps was evangelizing the log as an abstraction inside the company, and Kleppmann calls it a revelation: for the first time he understood how all these data systems fit together. That experience became Designing Data-Intensive Applications (DDIA). The first edition took about four years and missed its deadline by roughly two and a half; afterwards he moved to academia, and he now teaches distributed systems and operating systems at Cambridge.

The host, Gergely Orosz, was an engineering manager at Uber and now writes The Pragmatic Engineer newsletter; his recurring question is how a thing actually gets used inside real companies. This episode was recorded as DDIA's second edition came out, nine years after the first. Kleppmann co-wrote it with Chris Riccomini, an old LinkedIn colleague, because he admits academia had put him slightly out of touch with industry while Riccomini had kept tracking where data systems were going. The previous December, Kleppmann had published a post predicting that AI will make formal verification go mainstream, and the second half of the episode is about that.

The episode, unpacked

1. The book's philosophy: a little knowledge of internals is enough, and worth a lot

DDIA, Kleppmann says, is the book he wished he had at Rapportive, when the team hit database performance problems and groped around in the dark because nobody knew what the thing was doing inside. So the book doesn't teach any one tool; it compares the trade-offs across whole families of tools.

Orosz pushes on a practical worry: now that cloud services handle replication and scaling, do engineers still have any incentive to understand the layer underneath? Kleppmann reaches for garbage collection. In a garbage-collected language you stop thinking about memory allocation. People building low-level systems still have to care, but:

You're building higher-level business logic, actually I think it's just fine for people not to care about memory management.— Martin Kleppmann · [00:31:23]

He still asks one thing of application developers: know a little. The storage-engine chapter covers B-trees and LSM trees not so readers can write their own database, but so they have some intuition when performance goes strange. His example is choosing row-oriented or column-oriented storage for analytics: a small technical distinction with an enormous performance consequence.

And so those are those places where I feel like knowing a bit about the internals is actually like a superpower.— Martin Kleppmann · [00:35:21]

The thread ends on what an engineer is for. Orosz notes that the book's failure chapter is daily life for the S3 team and a once-a-decade crisis at a small company. Kleppmann refuses to make the call for anyone:

So, it's a trade-off between risk and cost, broadly speaking.— Martin Kleppmann · [00:46:28]

Where to sit on that curve is a business decision; the engineer's job is to make the risks and costs legible. The more code AI writes, he thinks, the more this becomes the core of the job.

2. What changed in the second edition: local disks out, object storage as the foundation

The first edition assumed every machine had local disks, each database wrote to its own disk, and replication meant the database software shipping data to another machine. Now more and more databases are built directly on object stores, and replication happens in the object store layer instead. Kleppmann is careful to separate this from cloud block devices like EBS: those still present the single-node operating-system abstraction, while an object store is a genuinely new abstraction that behaves differently. So the second edition doesn't add a cloud-native chapter; it rewrites that assumption into the whole book.

What came out is just as telling. The first edition covered MapReduce in detail; the second keeps it only as a teaching device for understanding sharded batch processing. What came in is data systems in support of AI, such as vector indexes, which to him are simply another indexing strategy and so went into the storage-engine chapter.

On scalability he makes two calls that cut against common intuition. First, sharding is less pressing, but mostly not thanks to the cloud: single machines have become so powerful that more and more workloads simply fit on one. Second, the genuinely new thing the cloud brought is scaling down, not up. A service that handles three requests a day can cost almost nothing on a serverless platform.

3. Local-first: solving the problem companies won't

The point of staying in academia, Kleppmann says, is the freedom to work against commercial incentives. For nearly a decade he has worked on local-first software: collaboration like Google Docs, but with control of the data handed back from cloud operators to users. On why subscription software can charge what it does, he doesn't soften it:

they are able to essentially hold a gun to the customer's head— Martin Kleppmann · [01:02:02]

The threat being: pay, or we delete your data. He understands the commercial logic, but a company whose revenue depends on lock-in will struggle to lower the gun on its own.

That is where the revocation puzzle from the opening comes from. With a central server, whatever it says came first, came first. Without one, you could run a consensus protocol, but consensus needs quorum votes and nodes that are online, which is exactly what offline editing and peer-to-peer sync are trying to avoid. His group took the harder road: no consensus, while keeping high availability and offline work. He says Automerge, the CRDT library he works on, is close to solving it. Orosz observes that a startup would simply accept the constraint of a central server; Kleppmann agrees, and says that is the right thing for a startup to do. Academia's job is to build the harder building block so that nobody else has to invent it from scratch.

4. Formal verification: LLMs make it both cheaper and more necessary

In industry Kleppmann never used formal verification; it took too long. Only in academia could he spend months in Isabelle proving subtle algorithms correct, the kind that corrupt data if they are wrong. He gives Orosz the simplest possible example: concatenate two lists, and the result's length equals the sum of their lengths. A test tries lengths zero, one and five; a proof by induction covers every length at once.

He sees LLMs pushing from both ends. They are getting better at writing proofs, which makes verification affordable where it used to be uneconomical; and they are generating code in such volume that human review cannot keep up.

If we have to manually review all of that code, then that will become the bottleneck.— Martin Kleppmann · [00:58:44]

Yet he keeps AI away from his own book and writes every word himself. It is not a matter of principle, he says, but because:

for myself, the process of writing is the way how I figure things out.— Martin Kleppmann · [01:21:11]

It is the same worry he has as a teacher. The essay a student hands in is not the point; the thinking that went into it is. In industry, getting the same result faster with AI is a win. In education, the part that gets skipped may be exactly the part that mattered.

Fact check

Kleppmann, on why the second edition cuts MapReduce: "MapReduce is dead. Nobody uses it anymore." [00:47:07]

Supported, but overstated

The direction is right: Google's infrastructure chief Urs Hölzle said publicly in 2014 that Google no longer really used it and had moved to what became Cloud Dataflow. But "nobody" goes too far: in Apache Hadoop 3.5.0, released in April 2026, MapReduce is still one of the four core modules.

Orosz, describing an Anthropic study: junior engineers split into an AI group and a no-AI group, and the AI group learned "little to no" material. [01:16:31]

Supported, but overstated

The paper is a randomized trial with 52 participants learning a new Python async library; more than half had seven-plus years of coding experience, so they were not juniors. The AI group scored about 17% lower on the quiz, a significant gap but far from "no learning," and the authors note they measured only about an hour. Kleppmann's "quibble with the methods, accept the principle" is the right calibration.

Kleppmann says LLMs are getting "increasingly good" at writing formal proofs. [00:58:44]

Supported

A September 2025 vericoding benchmark tested off-the-shelf models on more than 12,000 formal specifications: they produced a program plus a proof of its correctness 82% of the time in Dafny, 44% in Verus/Rust, and only 27% in Lean. The progress is real, but full automation is still far off, and the gap widens as the proof language gets harder.

Crossovers

Ten takeaways

  1. Martin Kleppmann wrote Designing Data-Intensive Applications as the book he lacked while debugging database performance blind at Rapportive.
  2. Working on Samza at LinkedIn, Kleppmann saw Jay Kreps frame Kafka as a log, and suddenly understood how data systems fit together.
  3. Kleppmann thinks business-logic developers can skip the low level, as garbage-collected languages free you from memory, but knowing some internals is a debugging superpower.
  4. For Kleppmann, where to sit between fault tolerance and cost is a business decision; the engineer's job is to make the risks and costs clear.
  5. The biggest change in DDIA's second edition is treating object storage as the foundation, moving replication out of the database into the object store.
  6. DDIA's second edition demotes MapReduce to a teaching device and adds vector indexes to the storage-engine chapter as one more indexing strategy.
  7. Kleppmann attributes the fading urgency of sharding mostly to more powerful single machines, and sees serverless scaling down to near-zero cost as the cloud's real novelty.
  8. In local-first software, a permission revocation concurrent with an edit can leave devices permanently inconsistent, and forgeable timestamps cannot settle the order.
  9. Kleppmann predicts LLMs will take formal verification mainstream: they make proofs cheaper, while their flood of code makes human review the bottleneck.
  10. Contract law's mailbox rule settles crossing revocations and acceptances with one fixed rule, the same structure as CRDTs converging replicas independently.

Sources