Skip to content
ImagineWorld

Designing Data-Intensive Applications

node_idnode-book_designing-data-intensive-applications
node_typenode-book
schema_profileworld.node_book.v1
statusactive
orthogonal_scopemanifold, entropy, authority, state
manifoldworld
entropymedium
authorityinforms
stateexternal
domainimagineworld.net
node_interiorrosetta_contract
unisonone evidence claim read five ways: seated in the solution-architecture field, the work is the definitive treatment of designing data-intensive applications — reliability, scalability, and maintainability across data systems — its framework, regime, and stance agreeing on what it is
governed_byWORLD-MANIFOLD
constitutional_citationCONSTITUTION
evidence_bundleworld-bundle-publication
compared_byworld-comparison-pillar-g-concurrency-storage-distributed-systems-and-graph-learning
grounded_by
anchors_into
peer_node_books
pillar_membershipG — concurrency_storage_distributed_systems
book_titleDesigning Data-Intensive Applications
book_subtitleThe Big Ideas Behind Reliable, Scalable, and Maintainable Systems
book_authorMartin Kleppmann
total_chapters12
total_source_pages557
total_nodes13
source_pdfdesigning-data-intensive-applications_author_kleppman.pdf
source_pdf_sha25631b3eb03c2113bf92c2b14ac8e7fbefb3f410769eea1494dc36cb4988d160ee6
source_text_output_slugdesigning-data-intensive-applications
ocr_sourceQwen3-VL-8B-Instruct via llama-server (scaffold-ocr-batch-v2; pdftoppm 150dpi grayscale)
ocr_quality_classdraft
verification_statusunverified
verification_progress{"all_nodes":"stitched from OCR output; frontier verification status per node"}
stitched_bykimi-k3-frontier-transposition-pass
generated_at2026-09-19
pillar_normalizedG-concurrency_storage_distributed_systems
updated_at2026-10-14T05:31:53Z
local graph

Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems — Martin Kleppmann

Section titled “Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems — Martin Kleppmann”

node-book_designing-data-intensive-applications_chapter-01-reliable-scalable-and-maintainable-applications — Reliable, Scalable, and Maintainable Applications

node-book_designing-data-intensive-applications_chapter-02-data-models-and-query-languages — Data Models and Query Languages

node-book_designing-data-intensive-applications_chapter-03-storage-and-retrieval — Storage and Retrieval

node-book_designing-data-intensive-applications_chapter-04-encoding-and-evolution — Encoding and Evolution

node-book_designing-data-intensive-applications_chapter-05-replication — Replication

node-book_designing-data-intensive-applications_chapter-06-partitioning — Partitioning

node-book_designing-data-intensive-applications_chapter-07-transactions — Transactions

node-book_designing-data-intensive-applications_chapter-08-the-trouble-with-distributed-systems — The Trouble with Distributed Systems

node-book_designing-data-intensive-applications_chapter-09-consistency-and-consensus — Consistency and Consensus

node-book_designing-data-intensive-applications_chapter-10-batch-processing — Batch Processing

node-book_designing-data-intensive-applications_chapter-11-stream-processing — Stream Processing

node-book_designing-data-intensive-applications_chapter-12-the-future-of-data-systems — The Future of Data Systems

[!visual-conversion] Cover, PDF 001. The text is transcribed in full under “Title Page” below. The rest of the cover is decorative: the O’REILLY logo bar at the top, a horizontal rule between the title and the subtitle, and an engraving of a leaping wild boar below the subtitle, the series cover animal. The engraving carries no information the text needs, so no raster is embedded.

O’REILLY

Designing Data-Intensive Applications

THE BIG IDEAS BEHIND RELIABLE, SCALABLE, AND MAINTAINABLE SYSTEMS

Martin Kleppmann

  • Preface — xiii

Part I. Foundations of Data Systems

  • 1. Reliable, Scalable, and Maintainable Applications — 3 - Thinking About Data Systems — 4 - Reliability — 6 - Hardware Faults — 7 - Software Errors — 8 - Human Errors — 9 - How Important Is Reliability? — 10 - Scalability — 10 - Describing Load — 11 - Describing Performance — 13 - Approaches for Coping with Load — 17 - Maintainability — 18 - Operability: Making Life Easy for Operations — 19 - Simplicity: Managing Complexity — 20 - Evolvability: Making Change Easy — 21 - Summary — 22
  • 2. Data Models and Query Languages — 27
    • Relational Model Versus Document Model — 28
      • The Birth of NoSQL — 29
      • The Object-Relational Mismatch — 29
      • Many-to-One and Many-to-Many Relationships — 33
      • Are Document Databases Repeating History? — 36
- Relational Versus Document Databases Today — 38
  • Query Languages for Data — 42
    • Declarative Queries on the Web — 44
    • MapReduce Querying — 46
  • Graph-Like Data Models — 49
    • Property Graphs — 50
    • The Cypher Query Language — 52
    • Graph Queries in SQL — 53
    • Triple-Stores and SPARQL — 55
    • The Foundation: Datalog — 60
  • Summary — 63
  • 3. Storage and Retrieval — 69
    • Data Structures That Power Your Database — 70
      • Hash Indexes — 72
      • SSTables and LSM-Trees — 76
      • B-Trees — 79
      • Comparing B-Trees and LSM-Trees — 83
      • Other Indexing Structures — 85
    • Transaction Processing or Analytics? — 90
      • Data Warehousing — 91
      • Stars and Snowflakes: Schemas for Analytics — 93
    • Column-Oriented Storage — 95
      • Column Compression — 97
      • Sort Order in Column Storage — 99
      • Writing to Column-Oriented Storage — 101
      • Aggregation: Data Cubes and Materialized Views — 101
    • Summary — 103
  • 4. Encoding and Evolution — 111
    • Formats for Encoding Data — 112
      • Language-Specific Formats — 113
      • JSON, XML, and Binary Variants — 114
      • Thrift and Protocol Buffers — 117
      • Avro — 122
      • The Merits of Schemas — 127
    • Modes of Dataflow — 128
      • Dataflow Through Databases — 129
      • Dataflow Through Services: REST and RPC — 131
      • Message-Passing Dataflow — 136
    • Summary — 139

Part II. Distributed Data

  • 5. Replication — 151
    • Leaders and Followers — 152
      • Synchronous Versus Asynchronous Replication — 153
      • Setting Up New Followers — 155
      • Handling Node Outages — 156
      • Implementation of Replication Logs — 158
    • Problems with Replication Lag — 161
      • Reading Your Own Writes — 162
      • Monotonic Reads — 164
      • Consistent Prefix Reads — 165
      • Solutions for Replication Lag — 167
    • Multi-Leader Replication — 168
      • Use Cases for Multi-Leader Replication — 168
      • Handling Write Conflicts — 171
      • Multi-Leader Replication Topologies — 175
    • Leaderless Replication — 177
      • Writing to the Database When a Node Is Down — 177
      • Limitations of Quorum Consistency — 181
      • Sloppy Quorums and Hinted Handoff — 183
      • Detecting Concurrent Writes — 184
    • Summary — 192
  • 6. Partitioning — 199
    • Partitioning and Replication — 200
    • Partitioning of Key-Value Data — 201
      • Partitioning by Key Range — 202
      • Partitioning by Hash of Key — 203
      • Skewed Workloads and Relieving Hot Spots — 205
    • Partitioning and Secondary Indexes — 206
      • Partitioning Secondary Indexes by Document — 206
      • Partitioning Secondary Indexes by Term — 208
    • Rebalancing Partitions — 209
      • Strategies for Rebalancing — 210
      • Operations: Automatic or Manual Rebalancing — 213
    • Request Routing — 214
      • Parallel Query Execution — 216
    • Summary — 216
  • 7. Transactions — 221
    • The Slippery Concept of a Transaction — 222
- The Meaning of ACID — 223
- Single-Object and Multi-Object Operations — 228
  • Weak Isolation Levels — 233
    • Read Committed — 234
    • Snapshot Isolation and Repeatable Read — 237
    • Preventing Lost Updates — 242
    • Write Skew and Phantoms — 246
  • Serializability — 251
    • Actual Serial Execution — 252
    • Two-Phase Locking (2PL) — 257
    • Serializable Snapshot Isolation (SSI) — 261
  • Summary — 266
  • 8. The Trouble with Distributed Systems — 273
    • Faults and Partial Failures — 274
      • Cloud Computing and Supercomputing — 275
    • Unreliable Networks — 277
      • Network Faults in Practice — 279
      • Detecting Faults — 280
      • Timeouts and Unbounded Delays — 281
      • Synchronous Versus Asynchronous Networks — 284
    • Unreliable Clocks — 287
      • Monotonic Versus Time-of-Day Clocks — 288
      • Clock Synchronization and Accuracy — 289
      • Relying on Synchronized Clocks — 291
      • Process Pauses — 295
    • Knowledge, Truth, and Lies — 300
      • The Truth Is Defined by the Majority — 300
      • Byzantine Faults — 304
      • System Model and Reality — 306
    • Summary — 310
  • 9. Consistency and Consensus — 321
    • Consistency Guarantees — 322
    • Linearizability — 324
      • What Makes a System Linearizable? — 325
      • Relying on Linearizability — 330
      • Implementing Linearizable Systems — 332
      • The Cost of Linearizability — 335
    • Ordering Guarantees — 339
      • Ordering and Causality — 339
      • Sequence Number Ordering — 343
- Total Order Broadcast — 348
  • Distributed Transactions and Consensus — 352
    • Atomic Commit and Two-Phase Commit (2PC) — 354
    • Distributed Transactions in Practice — 360
    • Fault-Tolerant Consensus — 364
    • Membership and Coordination Services — 370
  • Summary — 373

Part III. Derived Data

  • 10. Batch Processing — 389
    • Batch Processing with Unix Tools — 391
      • Simple Log Analysis — 391
      • The Unix Philosophy — 394
    • MapReduce and Distributed Filesystems — 397
      • MapReduce Job Execution — 399
      • Reduce-Side Joins and Grouping — 403
      • Map-Side Joins — 408
      • The Output of Batch Workflows — 411
      • Comparing Hadoop to Distributed Databases — 414
    • Beyond MapReduce — 419
      • Materialization of Intermediate State — 419
      • Graphs and Iterative Processing — 424
      • High-Level APIs and Languages — 426
    • Summary — 429
  • 11. Stream Processing — 439
    • Transmitting Event Streams — 440
      • Messaging Systems — 441
      • Partitioned Logs — 446
    • Databases and Streams — 451
      • Keeping Systems in Sync — 452
      • Change Data Capture — 454
      • Event Sourcing — 457
      • State, Streams, and Immutability — 459
    • Processing Streams — 464
      • Uses of Stream Processing — 465
      • Reasoning About Time — 468
      • Stream Joins — 472
      • Fault Tolerance — 476
    • Summary — 479
  • 12. The Future of Data Systems — 489
    • Data Integration — 490
      • Combining Specialized Tools by Deriving Data — 490
      • Batch and Stream Processing — 494
    • Unbundling Databases — 499
      • Composing Data Storage Technologies — 499
      • Designing Applications Around Dataflow — 504
      • Observing Derived State — 509
    • Aiming for Correctness — 515
      • The End-to-End Argument for Databases — 516
      • Enforcing Constraints — 521
      • Timeliness and Integrity — 524
      • Trust, but Verify — 528
    • Doing the Right Thing — 533
      • Predictive Analytics — 533
      • Privacy and Tracking — 536
    • Summary — 543
  • Glossary — 553
  • Index — 559

If you have worked in software engineering in recent years, especially in server-side and backend systems, you have probably been bombarded with a plethora of buzzwords relating to storage and processing of data. NoSQL! Big Data! Web-scale! Sharding! Eventual consistency! ACID! CAP theorem! Cloud services! MapReduce! Real-time!

In the last decade we have seen many interesting developments in databases, in distributed systems, and in the ways we build applications on top of them. There are various driving forces for these developments:

  • Internet companies such as Google, Yahoo!, Amazon, Facebook, LinkedIn, Microsoft, and Twitter are handling huge volumes of data and traffic, forcing them to create new tools that enable them to efficiently handle such scale.
  • Businesses need to be agile, test hypotheses cheaply, and respond quickly to new market insights by keeping development cycles short and data models flexible.
  • Free and open source software has become very successful and is now preferred to commercial or bespoke in-house software in many environments.
  • CPU clock speeds are barely increasing, but multi-core processors are standard, and networks are getting faster. This means parallelism is only going to increase.
  • Even if you work on a small team, you can now build systems that are distributed across many machines and even multiple geographic regions, thanks to infrastructure as a service (IaaS) such as Amazon Web Services.
  • Many services are now expected to be highly available; extended downtime due to outages or maintenance is becoming increasingly unacceptable.

Data-intensive applications are pushing the boundaries of what is possible by making use of these technological developments. We call an application data-intensive if data is its primary challenge—the quantity of data, the complexity of data, or the speed at which it is changing—as opposed to compute-intensive, where CPU cycles are the bottleneck.

The tools and technologies that help data-intensive applications store and process data have been rapidly adapting to these changes. New types of database systems (“NoSQL”) have been getting lots of attention, but message queues, caches, search indexes, frameworks for batch and stream processing, and related technologies are very important too. Many applications use some combination of these.

The buzzwords that fill this space are a sign of enthusiasm for the new possibilities, which is a great thing. However, as software engineers and architects, we also need to have a technically accurate and precise understanding of the various technologies and their trade-offs if we want to build good applications. For that understanding, we have to dig deeper than buzzwords.

Fortunately, behind the rapid changes in technology, there are enduring principles that remain true, no matter which version of a particular tool you are using. If you understand those principles, you’re in a position to see where each tool fits in, how to make good use of it, and how to avoid its pitfalls. That’s where this book comes in.

The goal of this book is to help you navigate the diverse and fast-changing landscape of technologies for processing and storing data. This book is not a tutorial for one particular tool, nor is it a textbook full of dry theory. Instead, we will look at examples of successful data systems: technologies that form the foundation of many popular applications and that have to meet scalability, performance, and reliability requirements in production every day.

We will dig into the internals of those systems, tease apart their key algorithms, discuss their principles and the trade-offs they have to make. On this journey, we will try to find useful ways of thinking about data systems—not just how they work, but also why they work that way, and what questions we need to ask.

After reading this book, you will be in a great position to decide which kind of technology is appropriate for which purpose, and understand how tools can be combined to form the foundation of a good application architecture. You won’t be ready to build your own database storage engine from scratch, but fortunately that is rarely necessary. You will, however, develop a good intuition for what your systems are doing under the hood so that you can reason about their behavior, make good design decisions, and track down any problems that may arise.

If you develop applications that have some kind of server/backend for storing or processing data, and your applications use the internet (e.g., web applications, mobile apps, or internet-connected sensors), then this book is for you.

This book is for software engineers, software architects, and technical managers who love to code. It is especially relevant if you need to make decisions about the architecture of the systems you work on—for example, if you need to choose tools for solving a given problem and figure out how best to apply them. But even if you have no choice over your tools, this book will help you better understand their strengths and weaknesses.

You should have some experience building web-based applications or network services, and you should be familiar with relational databases and SQL. Any non-relational databases and other data-related tools you know are a bonus, but not required. A general understanding of common network protocols like TCP and HTTP is helpful. Your choice of programming language or framework makes no difference for this book.

If any of the following are true for you, you’ll find this book valuable:

  • You want to learn how to make data systems scalable, for example, to support web or mobile apps with millions of users.
  • You need to make applications highly available (minimizing downtime) and operationally robust.
  • You are looking for ways of making systems easier to maintain in the long run, even as they grow and as requirements and technologies change.
  • You have a natural curiosity for the way things work and want to know what goes on inside major websites and online services. This book breaks down the internals of various databases and data processing systems, and it’s great fun to explore the bright thinking that went into their design.

Sometimes, when discussing scalable data systems, people make comments along the lines of, “You’re not Google or Amazon. Stop worrying about scale and just use a relational database.” There is truth in that statement: building for scale that you don’t need is wasted effort and may lock you into an inflexible design. In effect, it is a form of premature optimization. However, it’s also important to choose the right tool for the job, and different technologies each have their own strengths and weaknesses. As we shall see, relational databases are important but not the final word on dealing with data.

This book does not attempt to give detailed instructions on how to install or use specific software packages or APIs, since there is already plenty of documentation for those things. Instead we discuss the various principles and trade-offs that are fundamental to data systems, and we explore the different design decisions taken by different products.