Adetayo Akinsanya unkletayo.dev
Books / Book Notes: Designing Data-Intensive Applications by Martin Kleppmann

Book Notes: Designing Data-Intensive Applications by Martin Kleppmann

Martin Kleppmann’s Designing Data-Intensive Applications (DDIA) is widely regarded as the definitive guide to distributed systems storage, replication, and query engines.

Here are my top architectural takeaways and notes structured by fundamental data system dimensions.


1. Reliability, Scalability, and Maintainability

  • Reliability: Continuing to work correctly even when hardware faults, software bugs, or human errors occur.
  • Scalability: The system’s ability to cope with increased load (throughput, response times, percentile tail latencies like p99/p99.9).
  • Maintainability: Operability, simplicity (removing accidental complexity), and evolvability.

2. Storage Engines: B-Trees vs LSM-Trees

Storage Engine DimensionB-TreesLog-Structured Merge (LSM) Trees
Primary WorkloadRead-Heavy OLTP WorkloadsWrite-Heavy Streaming & Analytics
Write OperationOverwrites fixed-size pages (4KB-8KB) in-placeAppend-only to MemTable & SSTables
Write AmplificationHigher (Page writes + WAL log)Lower (Sequential disk writes)
FragmentationPage fragmentation requires vacuumingBackground compaction merges SSTables

3. Replication & Consensus

  1. Single-Leader Replication: All writes go to the leader. Easy to implement, but vulnerable to leader failover delays.
  2. Multi-Leader Replication: Useful for multi-datacenter deployments. Requires conflict resolution strategies (Last-Write-Wins, CRDTs).
  3. Leaderless Replication (Dynamo-style): Relies on Quorum reads/writes (R+W>NR + W > N) and read-repair mechanisms.

Key Reflections

Building resilient data systems requires accepting that hardware will fail, networks will partition, and clocks will drift. Architecture is the art of defining clean boundaries and fallback semantics when these failures occur.