“There are no solutions; there are only trade-offs. […] But you try to get the best trade-off you can get, and that’s all you can hope for.”

— Thomas Sowell

That opening quote in Chapter 1 of Designing Data-Intensive Applications (2nd Edition) hits close to home. In production, data and ML engineering is mostly a balancing act between cloud bills, data quality, freshness, and shipping before the business loses patience.

Chapter 1 doesn't jump straight into database internals. Instead, it frames four recurring trade-offs that shape modern data systems:

  • Operational vs. Analytical (OLTP vs. OLAP): Keeping user-facing traffic fast without starving heavy analytical scans.
  • Cloud vs. Self-Hosting: Trading managed speed and elasticity for hardware control and predictable bills.
  • Single-Node vs. Distributed: Trading the simplicity of one big box for the scale and resilience of a cluster.
  • Business Needs vs. User Rights: Balancing data collection against privacy laws, security risks, and liability.

Good architecture isn't about finding the "right" answer. It's about picking the trade-off your team and budget can actually live with right now.

OLTP vs. OLAP (and Derived Data)

Once a product gets real traffic, running analytical queries on your production database stops working. The two workloads fight over the exact same resources.

OLTP handles user-facing traffic: auth, checkouts, profile updates. It's all about small, frequent point queries and writes, ACID guarantees, and keeping p95/p99 latency low. If it locks up, users notice immediately.

OLAP powers BI, reporting, and ML training. It scans millions of rows to aggregate historical data. Here, you care about scan throughput and storage cost at scale, not single-row latency. (Real-time analytics engines like ClickHouse, Pinot, and Druid sit in the middle when you need fast aggregations inside user-facing products.)

When you separate them, a few trade-offs show up fast:

  • Resource contention: One heavy analytical scan eats CPU and disk IOPS, spiking API latency for live users.
  • Storage layout: Row-oriented storage is fast for reading or writing a single user record. Columnar storage wins when you only need 3 columns out of 100 across millions of rows.
  • Freshness vs. cost: Streaming and CDC give you near-real-time data, but they cost way more to run and maintain than a nightly batch job.
  • Warehouses vs. Lakes: Relational data warehouses work great for SQL and BI, but they're awkward for ML feature engineering or unstructured data. Data lakes store raw files (Parquet, Avro, text, images) cheaply in object storage—following the sushi principle ("raw data is better") so each consumer can transform data to fit its own use case.

One of the cleanest mental models in Chapter 1 is Systems of Record vs. Derived Data. Your operational database is usually the system of record (the source of truth). Your data warehouse, caches, search indexes, and trained ML models are derived data—redundant copies that you can rebuild if needed. Sometimes that loop closes via reverse ETL, pushing ML outputs back into operational systems.

%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 25, 'rankSpacing': 35}, 'themeVariables': { 'darkMode': true, 'background': '#0f172a', 'primaryColor': '#1e293b', 'secondaryColor': '#1e293b', 'tertiaryColor': '#1e293b', 'primaryTextColor': '#f8fafc', 'secondaryTextColor': '#f8fafc', 'tertiaryTextColor': '#f8fafc', 'textColor': '#f8fafc', 'primaryBorderColor': '#6366f1', 'lineColor': '#6366f1', 'edgeLabelBackground': '#1e293b', 'fontFamily': 'Inter, system-ui, sans-serif' }}}%% flowchart LR subgraph Canvas[" "] direction LR subgraph Operational["Operational (System of Record)"] App[User-Facing App] e1@--> OLTP[(OLTP DB)] end OLTP e2@-->|"ETL / CDC"| Lake[(Data Lake<br/>Raw / Parquet)] subgraph Analytical["Analytical (Derived Data)"] Lake e3@--> DW[(Data Warehouse<br/>BI & SQL)] Lake e4@--> FS[(Feature Store<br/>ML Training)] end FS e5@-.->|"Reverse ETL /<br/>Model Serving"| App end e1@{ animate: true } e2@{ animate: true } e3@{ animate: true } e4@{ animate: true } e5@{ animate: true } classDef app fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc classDef lake fill:#1e1b4b,stroke:#818cf8,stroke-width:2px,color:#f8fafc classDef ml fill:#2e1065,stroke:#c084fc,stroke-width:2px,color:#f8fafc class App,OLTP app class Lake,DW lake class FS ml style Canvas fill:#0f172a,stroke:#334155,stroke-width:1px style Operational fill:#0f172a,stroke:#38bdf8,stroke-width:1.5px,color:#f8fafc style Analytical fill:#0f172a,stroke:#a855f7,stroke-width:1.5px,color:#f8fafc

At high volume—like processing 150M daily GA4 records on AWS EMR or keeping Feature Store pipelines healthy—small inefficiencies in query patterns or schedules compound fast. Splitting OLTP and OLAP is the easy part. Deciding how fresh and how clean derived data needs to be at each hop is the real work.

Cloud vs. Self-Hosting

Choosing where to run your stack isn't an ideological debate. It's a decision about where your team spends its time and money.

Managed cloud buys you speed. You offload patching, backups, and provisioning so engineers can build product. True cloud-native systems go a step further: instead of treating VMs like traditional servers with durable local disks, they disaggregate storage from compute. Data lives in object storage (like S3 or GCS), local disks act as ephemeral caches, and compute scales up or down on demand.

%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 25, 'rankSpacing': 35}, 'themeVariables': { 'darkMode': true, 'background': '#0f172a', 'primaryColor': '#1e293b', 'secondaryColor': '#1e293b', 'tertiaryColor': '#1e293b', 'primaryTextColor': '#f8fafc', 'secondaryTextColor': '#f8fafc', 'tertiaryTextColor': '#f8fafc', 'textColor': '#f8fafc', 'primaryBorderColor': '#6366f1', 'lineColor': '#6366f1', 'edgeLabelBackground': '#1e293b', 'fontFamily': 'Inter, system-ui, sans-serif' }}}%% flowchart LR subgraph Canvas[" "] direction LR subgraph Traditional["Traditional / Coupled"] direction LR N1["Node 1<br/>Compute + Local Disk"] N2["Node 2<br/>Compute + Local Disk"] end subgraph CloudNative["Cloud-Native / Disaggregated"] direction TB subgraph Compute["Elastic Compute (Ephemeral Cache)"] direction LR C1["Worker 1"] C2["Worker 2"] C3["Worker N<br/>(Scale to 0)"] end S3[("Shared Object Storage<br/>(S3 / GCS)")] C1 e1@<--> S3 C2 e2@<--> S3 C3 e3@<--> S3 end Traditional ~~~ CloudNative end e1@{ animate: true } e2@{ animate: true } e3@{ animate: true } classDef trad fill:#1e293b,stroke:#64748b,stroke-width:2px,color:#f8fafc classDef comp fill:#1e1b4b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc classDef stor fill:#2e1065,stroke:#a855f7,stroke-width:2px,color:#f8fafc class N1,N2 trad class C1,C2,C3 comp class S3 stor style Canvas fill:#0f172a,stroke:#334155,stroke-width:1px style Traditional fill:#0f172a,stroke:#64748b,stroke-width:1.5px,color:#f8fafc style CloudNative fill:#0f172a,stroke:#818cf8,stroke-width:1.5px,color:#f8fafc style Compute fill:#172554,stroke:#38bdf8,stroke-dasharray: 4 4,color:#f8fafc

The catch is FinOps and control. As Kleppmann and Riccomini put it, in the cloud era, capacity planning becomes financial planning, and performance optimization becomes cost optimization. Metered billing climbs fast when queries aren't tuned or volumes spike. You also lose visibility into OS internals and get hit with vendor lock-in when APIs aren't standardized.

Self-hosting (PostgreSQL, ClickHouse, or Kafka on dedicated VMs or bare metal) gives you full control over the OS, kernel, and disk I/O. For steady, predictable workloads, unit economics often beat on-demand cloud pricing.

The trade-off is operational weight. Your team owns upgrades, high availability, security patches, and on-call. You also pay for idle capacity outside peak hours.

If running database internals isn't your competitive edge, managed services usually win early on. As spend and scale mature, moving specific heavy or predictable workloads to reserved capacity or self-hosted setups is often where the biggest savings sit.

Single-Node vs. Distributed

When traffic or data outgrows your current setup, you either buy a bigger machine or split the work across a cluster.

Single-node systems are underrated. Modern servers pack plenty of cores, RAM, and NVMe throughput. Keeping everything on one box means zero network hops, straightforward ACID transactions, and much simpler debugging and deploys. With tools like PostgreSQL, SQLite, and DuckDB, one machine goes a lot further than most teams think.

Eventually, though, you hit a wall. High-end hardware gets exponentially expensive, physical limits are real, and without replication, one dead host takes everything down.

Distributed systems aren't just for massive scale. You also distribute for fault tolerance, low latency across global regions, elastic cloud workloads, specialized hardware (like GPU nodes for ML), or data residency laws.

%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 25, 'rankSpacing': 35}, 'themeVariables': { 'darkMode': true, 'background': '#0f172a', 'primaryColor': '#1e293b', 'secondaryColor': '#1e293b', 'tertiaryColor': '#1e293b', 'primaryTextColor': '#f8fafc', 'secondaryTextColor': '#f8fafc', 'tertiaryTextColor': '#f8fafc', 'textColor': '#f8fafc', 'primaryBorderColor': '#6366f1', 'lineColor': '#8b5cf6', 'edgeLabelBackground': '#1e293b', 'fontFamily': 'Inter, system-ui, sans-serif' }}}%% flowchart TB subgraph Canvas[" "] direction TB subgraph Single["Single-Node"] direction LR App1[App] e1@-->|"Local ACID / Zero hops (SPOF)"| DB1[(One Big Box)] end subgraph Dist["Distributed Cluster"] direction TB LB[Load Balancer / Router] LB e2@-.->|"Latency"| Node1[(Node 1)] LB e3@-.->|"Retries"| Node2[(Node 2)] LB e4@-.->|"Failures"| Node3[(Node 3)] Node1 e5@<-->|"Consensus"| Node2 Node2 e6@<-->|"Sharding"| Node3 end Single ~~~ Dist end e1@{ animate: true } e2@{ animate: true } e3@{ animate: true } e4@{ animate: true } e5@{ animate: true } e6@{ animate: true } classDef single fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc classDef router fill:#1e1b4b,stroke:#818cf8,stroke-width:2px,color:#f8fafc classDef node fill:#2e1065,stroke:#c084fc,stroke-width:2px,color:#f8fafc class App1,DB1 single class LB router class Node1,Node2,Node3 node style Canvas fill:#0f172a,stroke:#334155,stroke-width:1px style Single fill:#0f172a,stroke:#38bdf8,stroke-width:1.5px,color:#f8fafc style Dist fill:#0f172a,stroke:#a855f7,stroke-width:1.5px,color:#f8fafc

The complexity tax is steep:

  • Networks drop packets and partition, so your code has to handle timeouts, retries, and idempotency.
  • Calling another service over a datacenter network is still vastly slower than an in-process function call. Sometimes moving compute to the data beats moving data over the network.
  • Maintaining consistency across services that each own their own database becomes the application's problem.
  • Debugging tail latency and tracing requests across services demand serious observability tooling (like OpenTelemetry).

The same pragmatism applies to microservices and serverless. Microservices are mostly a technical solution to a people problem—letting large teams deploy independently. In a small team, they're usually just overhead. Serverless brings metered billing to compute, but comes with cold starts and execution limits.

Start on a single node whenever you can. Ship fast, and don't pay the distributed tax for hypothetical scale. When throughput or availability genuinely outgrows one box—like serving low-latency online ML scoring at 600 TPS—that's when a distributed setup earns its keep.

Data, Law, and Liability

Chapter 1 closes with a trade-off engineers often ignore: the real cost of storing data goes beyond your S3 bill.

Privacy laws like GDPR, CCPA, and the EU AI Act directly affect system design. Take the "right to be forgotten." Many modern data systems rely on immutable, append-only logs and build layers of derived datasets—including ML training data. Deleting a single user's records from the middle of an immutable log or a trained model is a hard engineering problem.

There's also breach liability, compliance audits (PCI, SOC 2), and reputational risk. That's why data minimization (Datensparsamkeit) is replacing the old "hoard everything just in case" big data mindset. If a dataset's risk outweighs its value, the best architectural choice is not to store it at all.