Skip to content

Part 8 · Blueprint 48

Modern Data Lakehouse Architecture (Apache Iceberg / Delta Lake)

14 min reading · Sources · Editorial review pending

Object-store files alone do not define one consistent table version.

More
20px
Reading list
Page details

Published date · Last edited:

Draft edition. Editorial review and supplementary reading recommendations are still being completed.

Format: Architecture walkthrough. Prerequisites: the beginner bootcamp. Chapter prerequisites: Idempotency Keys & Distributed Retries, Distributed Blob & Object Storage (Amazon S3 Scale), Change Data Capture (CDC) & Outbox Pipelines (Debezium Scale).

Sixty-second mental model

Problem: Object-store files alone do not define one consistent table version.

Use: Publish metadata atomically and retain files required by live snapshots.

Design boundary: Publish coherent table snapshots over object storage. Data-file existence does not make a file part of a table; metadata references define the reader-visible snapshot.

Layer 1 · Intuition

Hypothetical scenario: Northwind is designing lakehouse tables. Maya represents product requirements, Dev implementation and Priya reliability. The team must agree what one data file means and which component owns the table snapshot.

Think of a catalog pointing to immutable data-file editions. Separate the requester from table snapshot, then identify the retained evidence needed after failure.

Authority
The entitled state owner.
Invariant
A rule preserved across concurrency and failures.

Architecture and worked reasoning

Design boundary: Publish coherent table snapshots over object storage. Data-file existence does not make a file part of a table; metadata references define the reader-visible snapshot.

Responsibilities on the request path

Lakehouse tables: responsibilities and request directionPublish coherent table snapshots over object storage. Data-file existence does not make a file part of a table; metadata references define the reader-visible snapshot.Writer filesManifest metadataCatalog commitSnapshot reader
Publish coherent table snapshots over object storage. Data-file existence does not make a file part of a table; metadata references define the reader-visible snapshot.

Workload and limiting resource

Hypothetical 1 TB table with 100 MB target files contains roughly 10,000 files in decimal units. A query touching 2% of correctly pruned files considers about 200 files, but actual bytes depend on projection and row-group pruning.

Keep the units attached to each intermediate result. The assumptions above describe a hypothetical exercise, not observed vendor capacity. A real capacity decision also needs a measured service curve, skew, recovery traffic and an explicit admission policy for overload.

Mutation or publication path

Lakehouse tables: mutation boundaryWrite candidate immutable data files. Then: Construct manifests describing the candidate snapshot. Then: Conditionally advance the catalog pointer and clean orphan candidates safely.Step 1
Write candidate immutable data files.
Step 2
Construct manifests describing the candidate snapshot.
Step 3
Conditionally advance the catalog pointer and clean orphan candidates safely.
Write candidate immutable data files. Then: Construct manifests describing the candidate snapshot. Then: Conditionally advance the catalog pointer and clean orphan candidates safely.
  1. Write candidate immutable data files.
  2. Construct manifests describing the candidate snapshot.
  3. Conditionally advance the catalog pointer and clean orphan candidates safely.

Observation and recovery path

Lakehouse tables: observation boundaryResolve one snapshot identity. Then: Read only files reachable from that snapshot. Then: Apply schema and partition interpretation for that version.Step 1
Resolve one snapshot identity.
Step 2
Read only files reachable from that snapshot.
Step 3
Apply schema and partition interpretation for that version.
Resolve one snapshot identity. Then: Read only files reachable from that snapshot. Then: Apply schema and partition interpretation for that version.
  1. Resolve one snapshot identity.
  2. Read only files reachable from that snapshot.
  3. Apply schema and partition interpretation for that version.

Failure that changes the decision

Hypothetical scenario: Two writers publish from the same base snapshot. A conditional catalog commit must detect conflict and apply a justified retry/merge, rather than losing one writer’s files.

Attempt this decision before reading the explanation

May an object-store directory listing be used as the table’s transaction log?

Not as a substitute for the selected table-format protocol. Readers need one coherent set of files and schema metadata, not whichever candidate objects happen to be visible.

Supporting mechanism analysis

Hypothetical scenario: Northwind. Maya represents product, Dev implementation and Priya reliability. The following workflow develops the underlying mechanism.

This gives rollback an actual path rather than a label. Separate expansion from removal and define the evidence needed before taking the next step.

A canary exposes a bounded population to a candidate while a baseline remains available for comparison. Its purpose is to collect decision evidence before wider exposure. A rollout percentage describes the exposure limit; it does not establish that the selected requests represent the workload or that enough observations have arrived to make the next decision.

The obvious response is to run every test against every release and then deploy everything at once. That improves pre-release evidence, but a finite test set still misses workload differences and serving-environment failures. A bounded release adds another observation point. It is especially useful when the possible consequence justifies limiting exposure while real traffic supplies missing evidence.

Hypothetical scenario. A new writer adds field price_evidence_v2. First expand readers so they tolerate both representations, then introduce compatible writes, migrate old state, observe adoption and only later remove the old form. Keep each phase independently recoverable.

Rollback after new data has been stored must still parse and honor that data. Reverting a binary cannot remove a message already consumed, a column already dropped or an external payment already made. Define forward repair when an old release cannot safely resume. Index or partition migrations also need explicit snapshot, catch-up, cutover and retained rollback evidence rather than treating the feature flag as the whole protocol.

For a versioned API response, readers and writers must agree about field meaning as well as syntax. A new optional field can coexist with tolerant older consumers; removing a required field needs a declared migration. PostgreSQL’s schema operations also have locking and rewrite behavior to inspect before choosing the deployment window.

For this PostgreSQL exercise, require the source revision still to equal the revision read, and reject a target already representing newer evidence. The live writer maintains both representations in the same row transaction. PostgreSQL’s UPDATE reference defines condition-based updates and returned updated rows; the migration must choose and verify the actual transaction behavior. Merely adding a version column does not enforce the comparison.

Assume a deliberately chosen stop rule: halt expansion if more than 1% of that completed cohort has a parser failure. One percent of 3,000 is 30. A count above 30 triggers the rule; exactly 30 does not under this wording. This is an illustrative operational threshold, not a statistical claim or a recommended universal error budget.

The canary needs a minimum-information condition as well as a maximum-exposure condition. A rare permission failure can matter before enough ordinary requests accumulate to estimate an average. Northwind should stop immediately on a confirmed forbidden disclosure rather than let a numerical aggregate excuse it until the observation window closes.

Preserve the evidence revision and task identity for each paired comparison. If the baseline saw yesterday’s price revision while the candidate saw today’s, the result confounds source freshness with handler behavior. A comparison record should identify the query, source revision, permissions and configuration without copying unnecessary private content into broadly accessible logs.

Amazon’s public account of the February 2017 S3 disruption describes a command intended to remove a small number of servers that removed a larger set than intended. The report explains recovery dependencies and subsequent safeguards. This is a real published incident; it is not a claim about Northwind’s operations or a forecast of a similar outage.

A second region changes routing, data freshness, available capacity and sometimes dependency behavior. An endpoint that accepts a probe is not evidence that it can serve the entire workload. Derive the admitted rate and inspect replication lag before moving writes. Region count alone does not establish an availability claim.

Hypothetical failure scenario. The new application removes an old quantity field and writes only its replacement. A canary check stops expansion, but the saved prior image cannot read current rows. Reverting traffic therefore fails to restore service. The rollback artifact exists; the compatible stored-state contract does not.

A small traffic percentage does not bound impact when the candidate writes shared state read by everyone. A saved old image does not prove a working rollback after an incompatible migration. An apparently clean error-rate graph does not prove that private evidence remained private. Each promise needs a measurement or an enforcement point that matches the consequence.

Use a direct small change when its scope is narrow, its consequences are understood and recovery is straightforward. Use shadowing and canaries when behavior depends on real input distribution or consequences justify bounded exposure. Use staged data migration when old and new components must coexist. The appropriate process follows the failure and recovery contract.

After a rollback, review the failed cohort against the original manifest. Record which signal stopped expansion and whether the recovery preserved the expected customer state. That short decision record makes the next attempt a targeted repair rather than another unexamined deployment.

Layer 3 · Internals

An Apache Iceberg table is more than a directory of Parquet files. Its metadata identifies a snapshot and the files or manifests belonging to that view. Writers create immutable artifacts and publish a new metadata state through a catalog protocol. Readers holding an older snapshot can continue to require files that the latest version no longer uses.

Atomic snapshot publication does not make every application workflow one distributed transaction. Concurrent writers can conflict and need validation or retry under the actual catalog and table rules. Schema evolution also needs stable field identity so renaming or reordering a field does not reinterpret old bytes as a different meaning. Partition evolution lets different file generations use different layouts; readers must interpret each correctly. Snapshot expiration and orphan-file removal need retention windows longer than legitimate writers and readers may hold references. Treating every currently unreferenced file as immediately deletable can race an unfinished commit or an active historical reader.

Trade-offs and limits

ApproachProvidesRequires
Snapshot table metadataProvides a consistent file set to readers.Catalog concurrency and metadata validation are required.
Unmanaged file directoryHas a small initial control surface.Concurrent reads and writes lack a table-level publication contract.

Recovery decision

Hypothetical scenario: Two writers publish from the same base snapshot. A conditional catalog commit must detect conflict and apply a justified retry/merge, rather than losing one writer’s files.

Not as a substitute for the selected table-format protocol. Readers need one coherent set of files and schema metadata, not whichever candidate objects happen to be visible.

Write your design before revealing the review

May an object-store directory listing be used as the table’s transaction log?

Evidence you can explain in your own design

Drafts and self-review are stored only in this browser. They are separate from reading completion.

Compare your decision

Not as a substitute for the selected table-format protocol. Readers need one coherent set of files and schema metadata, not whichever candidate objects happen to be visible.

Two writers publish from the same base snapshot. A conditional catalog commit must detect conflict and apply a justified retry/merge, rather than losing one writer’s files.

Check your understanding

May an object-store directory listing be used as the table’s transaction log?

Not as a substitute for the selected table-format protocol. Readers need one coherent set of files and schema metadata, not whichever candidate objects happen to be visible.

How would you recover from this failure: Two writers publish from the same base snapshot. A conditional catalog commit must detect conflict and apply a justified retry/merge, rather than losing one writer’s files.

Start with the exact boundary that failed. Write candidate immutable data files. Construct manifests describing the candidate snapshot. Conditionally advance the catalog pointer and clean orphan candidates safely. Then recover evidence through the observation path: Resolve one snapshot identity. Read only files reachable from that snapshot. Apply schema and partition interpretation for that version. Preserve the distinction between a confirmed state change and an unavailable response.

Which assumption in the worked calculation would a burst or concentrated tenant invalidate first?

Hypothetical 1 TB table with 100 MB target files contains roughly 10,000 files in decimal units. A query touching 2% of correctly pruned files considers about 200 files, but actual bytes depend on projection and row-group pruning. Recompute the affected resource rather than multiplying unrelated storage and network budgets by the same factor. Publish coherent table snapshots over object storage. Data-file existence does not make a file part of a table; metadata references define the reader-visible snapshot.

Which component in this topology could be removed from a smaller first deployment?

Writer files, Manifest metadata, Catalog commit, Snapshot reader name responsibilities, not a requirement for separate processes. Co-locate responsibilities when their transaction, trust and capacity boundaries permit it. Write candidate immutable data files.

What evidence must a caller have before relying on the observation path?

Resolve one snapshot identity. Read only files reachable from that snapshot. Apply schema and partition interpretation for that version. Not as a substitute for the selected table-format protocol. Readers need one coherent set of files and schema metadata, not whichever candidate objects happen to be visible.

45-minute interview rubric

  1. 00–05: scope data file and table snapshot.
  2. 05–12: identify the limiting resource and derive the domain workload above, retaining units and assumptions.
  3. 12–28: draw table snapshot, numbered writes and reads.
  4. 28–40: challenge recovery: Publish metadata atomically and retain files required by live snapshots.
  5. 40–45: defend table_id placement, observations and remaining assumptions.

Go deeper

Decision log

Publish metadata atomically and retain files required by live snapshots.

Preserve data file identity and table snapshot ownership.

Revisit changed workload, observations or recovery objectives.