Databases on Object Storage
Why a new generation of databases, queues and search engines keeps no data on local disk at all — what made it possible, how a write survives 50 ms object-store latency, and how compare-and-swap on a file replaces a consensus cluster.
#A different place to put the data
The classic database design keeps data on disks attached to its own machines and replicates it to other machines for durability. Over the last few years a growing set of systems has done something that would have sounded reckless a decade ago: keep the durable copy only in object storage — S3 or its equivalents — and treat local disks and memory as nothing more than a cache.
CLASSIC (shared-nothing) OBJECT-STORAGE NATIVE
node 1 [ data on local disk ] compute 1 [ cache ] ┐
node 2 [ replica on local disk ] compute 2 [ cache ] ├─► object store
node 3 [ replica on local disk ] compute 3 [ cache ] ┘ (the only
durable copy)
durability = replicate between durability = the object store's
your own machines own replication across zones
lose a node → re-copy its data lose a node → start another;
nothing to re-copy"Shared-nothing" is the classic layout on the left: each node owns its own disks and shares no storage with the others, so any copying between nodes is the database's own job.
The examples now span most kinds of data system:
| System | What it is | The object-storage idea |
|---|---|---|
| Snowflake, BigQuery | Data warehouses | The pioneers: storage separated from compute, which scales independently |
| Iceberg, Delta Lake | Table formats | Tables are files plus metadata, committed atomically |
| Neon | Postgres | WAL to a small quorum, pages to object storage |
| WarpStream, Kafka diskless topics | Message logs | Brokers keep nothing; batches go straight to object storage |
| turbopuffer, LanceDB | Search and vector databases | Indexes in object storage, hot data cached on NVMe |
| SlateDB | Embedded key-value store | An LSM tree whose files live only in object storage |
#Why now: three changes
1. Strong consistency (2020). S3 became strongly consistent for reads after writes in December 2020. Before that, a reader might not see an object it had just written, which made building a database on it a minefield.
2. Compare-and-swap on objects (2024). S3 added conditional writes: in August 2024, "create this object only if it doesn't already exist" (If-None-Match); in November 2024, "replace this object only if it's still the version I read" (If-Match on the ETag — a fingerprint S3 returns with every object, which changes whenever the object does). Google Cloud Storage and Azure had offered similar preconditions for longer. That single primitive is enough to coordinate writers without a separate consensus cluster — more below.
3. The economics of cloud networking. In the cloud, copying data between availability zones is billed per gigabyte, in both directions. A classic replicated database or Kafka cluster copies every byte to two other zones — often its largest cost. Object storage replicates across zones internally, with no per-gigabyte transfer charge for writing to it from within the region. Moving replication into the object store removes that line from the bill.
#The latency problem, and the standard answer
Object storage is durable, cheap and effectively unlimited. It is not fast:
Local NVMe write ~0.02-0.1 ms
Write to a replica in another ~1-2 ms
availability zone
S3 Standard PUT ~20-100 ms typical, more for the slowest
S3 Express One Zone single-digit ms, one zone onlyA database that waited 50 ms per write would be useless for most workloads. The answer, in every system above, is the same one databases have always used for slow disks: batch.
The trade is plain: throughput and cost improve, per-write latency gets worse. Systems then claw some latency back in a few standard ways:
- A low-latency write-ahead log in front. Neon writes its WAL to a small Paxos group of "safekeepers" — three or so servers that must agree, via the Paxos consensus protocol, before a write counts — for fast commits, and moves pages to object storage in the background. Others write the log to S3 Express One Zone, or to replicated local disks, and flush to standard object storage later.
- Acknowledge on the fast tier, upload later — and be explicit about what survives losing that tier. If the fast tier is S3 Express One Zone, an acknowledged write that hasn't reached standard S3 yet is lost if that one zone goes down.
- Choose per topic or table. Kafka's diskless topics are opt-in: low-latency topics keep classic replication, high-volume logs that tolerate a second of delay go diskless.
#Reads: caching is the whole performance story
A read that goes all the way to object storage costs tens of milliseconds and a request fee. So these systems cache aggressively in layers:
memory hot data microseconds
local NVMe warm data ~0.1 ms (far cheaper per GB than
RAM; fast for big reads)
object store everything else tens of msRouting matters as much as the cache. turbopuffer, for example, sends queries for the same namespace (one customer's index, say) to the same query node so that node's NVMe cache stays warm — the same cache-affinity idea used for LLM prefix caches. A cold read of a rarely touched dataset is slow; a warm read is fast. That's the bet: most data is cold most of the time, and paying object-storage prices for it while caching the hot part beats paying replicated-disk prices for all of it.
#Coordination without a consensus cluster
The interesting systems problem. Many writers can append immutable files safely — names are unique, nothing is overwritten. The hard part is the one mutable thing every database has: the pointer to its current state (the manifest, the table metadata, the list of live files). Two writers updating it at once would corrupt the database.
Classically you'd run a consensus group (ZooKeeper, etcd) to decide who the writer is. With conditional writes, the object store itself can do it. The trick is a writer epoch: a number stored in the manifest that goes up by one every time a new writer takes over. Whoever successfully wrote the latest epoch is the writer.
THE MANIFEST HOLDS: list of live data files + writer epoch
Writer B starts:
read manifest → epoch 7, ETag "e7"
write manifest, epoch 8,
IF-MATCH "e7" → succeeds: B is now the writer
Old writer A (paused, then wakes up) tries to commit:
write manifest, epoch 7 + its new files,
IF-MATCH "e7" → FAILS: the manifest has changed
A learns it was fenced off and stopsThat's a fencing token implemented as a compare-and-swap on a file.
SlateDB uses exactly this pattern. Each new writer bumps the epoch in the manifest with an If-Match write. Its write-ahead-log objects are created with If-None-Match ("only if this name doesn't exist yet"), using names tied to that epoch. Together these stop a "zombie" writer — an old writer that was cut off by a network partition or a long pause and still thinks it's in charge — from slipping stale data in after a new writer has taken over.
Table formats work the same way. An Iceberg or Delta commit is an atomic swap of the pointer to the current metadata — via a catalog or, increasingly, via a conditional write on the object store itself. Many writers prepare new files in parallel; only the pointer swap must be serialised, and the loser of a race retries its commit against the new state.
#When it fits, and when it doesn't
| Good fit | Poor fit |
|---|---|
| Analytics, logs, metrics, search over large mostly-cold data | Transactions needing single-digit-ms commits at high rates |
| Many tenants, each queried occasionally | Small, hot datasets that fit comfortably on one machine |
| Elastic compute — scale to zero when idle | Workloads dominated by tiny random writes |
| Avoiding cross-zone replication costs | Single-zone deployments where replication is cheap anyway |
| Simple operations — losing a node loses no data | Teams that can't tolerate cold-read latency spikes |
#Check yourself
What does "object-storage native" mean for a database?Show answer
Which three changes made databases on object storage practical?Show answer
How do these systems cope with 20–100 ms object-store writes?Show answer
Why is batching mandatory in money as well as latency?Show answer
How do object-storage systems make reads fast?Show answer
How can a conditional write replace a consensus cluster?Show answer
What is the underlying pattern?Show answer
When is this architecture a poor fit?Show answer
#What to carry forward
- Object storage can be the database's only durable copy; local storage becomes a cache.
- Strong consistency, conditional writes and cross-zone pricing made the shift practical.
- Batch every write — it's what makes latency tolerable and request costs sane.
- Immutable files plus one compare-and-swapped pointer replaces a consensus cluster.
- Great for large, mostly cold, elastic workloads; estimate request costs before choosing it.