# Every storage system is the same system

Source: https://archil.com/storage-space

Caches, disks, databases, buckets and archives are the same thing with different knobs turned: write latency, read latency, cost and durability. An interactive map of 17 storage products, and what it looks like when the knobs are yours.

[Archil](https://archil.com/)

Engineering

# Every storage system is the same system

Caches, disks, databases, buckets and archives are all the same thing with different knobs turned. Here’s a map of seventeen of them, and what it looks like when the knobs are yours.

Hunter LeathNovember 30, 202615 min read · 4 interactive figures

In [Building the last WAL on S3](https://archil.com/post/building-the-last-wal-on-s3), I made a claim that I haven’t stopped thinking about: that _actually_ all infrastructure workloads are exactly the same, just with different parameters. I mostly asserted it in that post. This one is my attempt to show it.

Every storage system does one job. It takes bytes now and hands them back later. Valkey, EBS, Postgres and S3 all do it, and so does whatever robot is finding your object in Glacier right now. We buy them from different teams and draw them as different boxes on the architecture diagram, and every one of them takes a write and serves it back as a read.

What separates them is how well they do it, and I think that comes down to four numbers:

-   w, **write latency**: how long a small write takes to be acknowledged (and safe, if the system promises safety at all).
-   r, **read latency**: how long until the first byte of a small read that isn’t already cached.
-   c, **cost**: dollars to keep a gigabyte around for a month.
-   d, **durability**: how sure you can be that the byte is still there in a year, counted in nines. 99.999% is five.

S = (w, r, c, d)

Every storage product is a point in this four-dimensional space, and every storage decision you’ve made in an architecture review was a decision about which point you needed. Here are seventeen of them, pulled from AWS’s docs and price lists.11us-east-1, checked November 30, 2026. Cost is storage alone, and our estimates are marked in Table 2. I left raw DRAM out: nothing that goes through a system call is going to match a 100 ns load, including us.

Left is better on every axis. **EBS gp3**Hover or tap a dot, or pick a product below.

priced per GB you store priced per GB you provision, drawn at its cost per GB stored when it’s 100% full

MemoryBlockFileDatabaseLogObjectArchive

**Figure 1.**Seventeen products on four axes, better to the left on each. A product that was the best at everything would be a straight line down the left edge. None of them are.

## 1 The axes are wide

The first thing that jumped out at me when I plotted these is the scale. Read latency spans more than eight orders of magnitude, from 100 µs on local NVMe to twelve hours to restore something from Deep Archive. Cost spans four: Valkey keeps a gigabyte in memory for about $10 a month, and Deep Archive keeps it for a tenth of a cent. So every chart in this post uses log scales, where 3 ms and 4 ms land in nearly the same spot and 1 ms and 10 ms are a full step apart.

The second is that every product is bad at something. Click through Figure 1 and you’ll see it. Valkey is fast, expensive, and doesn’t really promise to keep anything. S3 is cheap and durable, and takes tens of milliseconds to answer. EBS gp3 is fast and cheap, and AWS expects to lose one or two volumes out of every thousand, every year.

## 2 The frontier

Put two of these axes on a plane and the tradeoff turns into a shape. In Figure 2, read latency runs left to right and cost runs bottom to top, so the corner that you want is the bottom left, fast and cheap. The hatched area is everywhere that no product reaches. Its edge is the [Pareto frontier](https://en.wikipedia.org/wiki/Pareto_front), the products that are cheaper than everything that’s faster than them.

The squares are disks, volumes and cache nodes, which charge for every gigabyte you provision whether or not anything is on it. They’re drawn as if they were full, and nobody runs a volume full. At half full, each gigabyte you actually store on gp3 costs $0.16, which is about a third of a decade higher on this chart. You can change how full they’re drawn in the key under any figure, and they’ll move in all of them.

The other two axes act like filters. Ask for writes acknowledged in under a millisecond, or for five nines of durability, and watch the products that can’t do it drop out. The frontier slides up and to the right. Ask for a millisecond and eleven nines together, and nothing is left.

Writes acknowledged within

Durability of at least

priced per GB you store priced per GB you provision, drawn at its cost per GB stored when it’s 100% full

**17 of 17** products qualify. The fastest to read is Local NVMe at 100 µs, for $0.098 a GB-month; the cheapest is Deep Archive, at $0.00099, which reads in 12 h.

**Figure 2.**Read latency against cost, both on log scales; Glacier’s hours sit past the break in the axis. Squares are products you pay for by the GB you provision, drawn at what a GB stored costs at the fill in the key. Hover over a product to see all four of its numbers.

## 3 Why every product is a point

These numbers come from physics, and the people who built each product locked that physics in on day one.

Read latency comes from the medium and the distance to it: about 100 µs to an NVMe drive in the same machine, a millisecond to an SSD across the network, ten to move a disk head, tens to get through S3’s front end, and hours for Glacier to go find your data and stage it.

Cost is the medium’s price times the number of copies. Memory costs dollars per gigabyte-month, SSD costs dimes, hard drives cost pennies, and archival media costs fractions of a cent.

Durability comes down to how many copies there are and how independently they fail. A volume replicated inside one zone loses one or two out of every thousand a year. S3 erasure-codes objects across at least three zones and is designed to lose one in a hundred billion.

Write latency is set by how many of those copies a write waits for, and where they are. A write that waits for nothing takes microseconds, one that waits for another machine in the same zone takes a fraction of a millisecond, and one that waits for another zone takes a millisecond or more, every time.22If you want the long version, we walk through every layer a write can be acknowledged from (from the page cache all the way to a quorum across zones) in [Where fsync returns from](https://archil.com/guides/how-file-systems-work/where-fsync-returns-from).

I’ve spent years building storage services with eleven nines of durability, and this is most of the design. A product is three decisions: a medium, a number of copies, and the point where you tell the client that a write is done. You make them once, and they apply to every byte a customer ever stores, so the whole product sits at one point.

The problem is that your data doesn’t come in one kind. Some of it gets read a thousand times a second, and some of it hasn’t been opened since last year. Some writes are a payment, and some are a cache that you could rebuild in a minute. A single point is right for almost none of it, which is why every real system I’ve seen turns into a stack: Valkey in front of Postgres on gp3, with old rows exported to S3 and backups lifecycled to Glacier. Every layer is a point, and the code that shuffles data between them is yours to write (and to get paged for).

Figure 3 draws that stack as a path through the space. It also draws a couple of products that are stacks on the inside, where the vendor wrote the shuffling code for you, and fixed where every layer sits on the day they designed it.

Build it from

priced per GB you store priced per GB you provision, drawn at its cost per GB stored when it’s 100% full

The stack from the paragraph above: a cache, a database, a bucket and an archive, each one a product you run.

1.  1
    
    Valkey300 µs · $9.8
    
    A copy of the hottest rows
    
    Cache-aside, and invalidation on every update
    
2.  2
    
    Postgres on EBS gp3w1 ms · $0.08
    
    Every live row
    
    A nightly job that exports old rows
    
3.  3
    
    S325 ms · $0.023
    
    Old rows
    
    A backup job, and a lifecycle rule
    
4.  4
    
    Glacier Flexible Retrieval4 h · $0.0036
    
    Backups
    

A write is safe after

1 ms, on one volume in one zone (2.8 nines)

Moving data between layers

Your code: three jobs, and the pager for each

Where each layer sits

Wherever you put it

**Figure 3.**A stack is a path through the space: each layer is a point, and the lines between them are code that moves data from one to the next. Writes are only safe once they reach the layer marked w, and reads go as far down the stack as they have to.

## 4 Turn the point into settings

On Archil, every byte lives in object storage, which sets the floor on cost and the ceiling on durability, and everything faster is a cache in front of it.

turbopuffer is built the same way, and you can flip to it in Figure 3. It made each choice once, for search: a write waits for object storage (165 ms at the median), and the cache lives on the node that runs your query. Those are good choices for a search engine. A disk has to serve more kinds of data, so on Archil the decisions that a product makes once, at design time, are settings:

1.  **Where `fsync` returns.** Once the write is in the client’s memory, on the client’s local disk, on SSD replicated inside one Availability Zone, or on SSD across several zones (the default). This sets w, and d until the write makes it to object storage.
2.  **Where the cache lives.** On Archil’s SSD tier, about a millisecond away, or right on the client: its local NVMe (around 100 µs) or its memory (tens of µs). This sets r.
3.  **How much is cached,** from nothing all the way to everything. This sets c, and how often a read misses.
4.  **Where everything else lives.** An Archil-managed disk, or your own bucket in whatever storage class you choose. This sets the floor under c.33Managed disks pay our archive rate, $0.025 a GB-month. If you sync a disk to your own bucket, you pay your cloud provider for the bucket instead. Standard-IA and Glacier Instant Retrieval also charge per GB that you read, which a cache in front of them keeps rare.

Each setting moves a coordinate, and each one has a price. In Figure 4, every setting sits next to the number it moves. Pick a product and the settings jump to the combination that lands closest to it, then change them and see what happens.

Set Archil up like

MemoryBlockFileDatabaseLogObjectArchive

Setting Archil S3 reachable with settingsvs. S3

Where `fsync` returns

w Write latency

15× faster

Where the cache lives

r Read latency

50× faster

How much is cached: 2%

Where everything else lives (Archil’s bucket, or yours)

c Cost per GB-month

same

Follows from where `fsync` returns, and how long a write waits there before it reaches object storage.

d Durability, in nines

same

priced per GB you store priced per GB you provision, drawn at its cost per GB stored when it’s 100% full

Archil: fsync returns once the write is on SSD in several zones; 2% of the data is cached in Archil’s SSD tier; the rest lives in an Archil-managed disk.

**Figure 4.**One row per number, with the setting that moves it. Better is on the left of every axis, and time and cost are on log scales; the gray dots are the seventeen products, the ring is the one you picked, and the orange band is everywhere that the settings can put Archil.

## 5 Seventeen products, one disk

Do this for every product and you get Table 1. With the right settings, Archil lands on or past 15 of the 17 on all four numbers at once. A few of my favorites: Valkey, with writes acknowledged on local disk and everything cached there (6.0× faster on writes, 32× cheaper, and the data actually survives). S3, with a 2% SSD cache. Aurora, with half the data on SSD.

We don’t reach the other two, and once you look at where they are, that makes sense. They’re the two corners of the map, and each one gets there by giving up something we won’t:

-   **Local NVMe** acknowledges a write in 30 µs because nothing sits between you and the drive. Archil acknowledging from that same drive takes 50 µs, because the write goes through our client on its way there. That client is the thing that gets your data off the machine before the machine dies. Take it away and you get the raw drive back, along with its one nine.
-   **Deep Archive** costs $0.00099 a GB-month, a quarter of Glacier Instant Retrieval, because it gives up reading. Getting a byte back takes up to twelve hours. Anything that answers a `read()` can’t live there, and that includes us. (If you have backups that will never be read, a lifecycle rule on your bucket will put them there.)

One caveat applies to every row: r is the latency of a read that hits the cache. A read of data outside the cache pays the cold store’s latency, about 25 ms, the first time; that’s the hollow dot on the read row of Figure 4. A cache sized for your working set rarely pays it. A cache of zero always does, the same as S3.44Caching on the client isn’t free, so we count what it costs you: $2.60 a GB-month for memory (what an r7i charges over a c7i) and $0.098 for local NVMe (what a c6id charges over a c6i), on top of our active rate of $0.19.

## 6 Durability is a rate

Archil acknowledges a write on SSD (or a local disk), and the write makes it to object storage afterwards. So which durability does the write have, the SSD’s or object storage’s?

Durability is a probability per year, so the answer is a weighted sum. A byte that spends τ seconds at five nines, and then the rest of the year at eleven, is lost with probability about:

P(loss) ≈ 10−5 · τ / (3.16 × 107 s) + 10−11the window at the acknowledgement’s durability, plus a year at object storage’s

With τ at 30 seconds, acknowledging across zones works out to 10.7 nines. In one zone, at three nines while it waits, it’s 9.0. On a local disk, at about one nine, it’s still 7.0. Only the in-memory acknowledgement gives up on durability entirely, and the figures plot it at zero.55τ is the longest a write waits between being acknowledged and landing in object storage. I’m using 30 seconds here; a longer window lowers all of these numbers.

The number does hide what kind of loss it is, though. When the window bites, you lose the last few seconds of writes, and older data is untouched. That’s the same deal that Postgres gives you with `synchronous_commit = off`, and it’s the right deal for a lot of workloads, but you should know that you’re making it.

## 7 Data moves

Storage gets sold as points. You pick the one closest to what you need, and when none is close enough, you build a stack. Some of those points are exactly right for their data (a volume sitting next to a database, or a bucket you never read), and they aren’t going anywhere.

Most data doesn’t stay at one point, though. It’s written hot, read for a while, and then forgotten. A disk whose numbers are settings can follow it around: you set them per disk, change them later, and keep one copy in object storage underneath the whole time. The last option in Figure 3 shows this, with the same layers as the stack and Archil moving data between them instead of your cron jobs.

If you have a workload that you think doesn’t fit, my DMs are always open.

Try the settings on a real disk.

Archil disks mount as POSIX file systems on any Linux machine, with object storage underneath.

[Create a disk](https://console.archil.com/?utm_source=archil.com&utm_medium=website&utm_content=storage-space-cta) [Read the docs](https://docs.archil.com)

## Appendix The numbers

### Table 1. The closest Archil setting for each product

| Product | Archil setting | w | r | c | d |
| --- | --- | --- | --- | --- | --- |
| ElastiCache for Valkey | Ack: local disk · all cached in local disk · Archil-managed | 6.0× faster | 3.0× faster | 32× cheaper | +7 nines |
| EC2 instance store (NVMe) | Ack: local disk · 25% cached in local disk · Archil-managed | 1.7× slower | same | same | +6 nines |
| EBS gp3 | Ack: one zone · 25% cached in archil ssd · Archil-managed | same | 2.0× faster | same | +6 nines |
| EBS io2 Block Express | Ack: local disk · 50% cached in archil ssd · Archil-managed | 8.0× faster | same | same | +2 nines |
| EBS st1 (HDD) | Ack: several zones · 10% cached in archil ssd · Archil-managed | 3.0× faster | 16× faster | same | +8 nines |
| EBS sc1 (cold HDD) | Ack: several zones · 5% cached in archil ssd · Your Glacier IR | 6.0× faster | 30× faster | same | +8 nines |
| Amazon EFS Standard | Ack: several zones · all cached in archil ssd · Archil-managed | 1.4× faster | 2.0× faster | 1.4× cheaper | same |
| RDS for PostgreSQL, Multi-AZ | Ack: several zones · all cached in archil ssd · Archil-managed | 1.5× faster | 3.0× faster | same | +6 nines |
| Aurora PostgreSQL | Ack: several zones · 50% cached in archil ssd · Archil-managed | 1.5× faster | 3.0× faster | same | +2 nines |
| Amazon DynamoDB | Ack: several zones · all cached in archil ssd · Archil-managed | 2.5× faster | 6.0× faster | same | +2 nines |
| Amazon MSK (Kafka, acks=all) | Ack: several zones · all cached in archil ssd · Archil-managed | 3.0× faster | 6.0× faster | 1.4× cheaper | +7 nines |
| S3 Express One Zone | Ack: several zones · 50% cached in archil ssd · Archil-managed | 4.0× faster | 10× faster | same | same |
| S3 Standard | Ack: several zones · 2% cached in archil ssd · Archil-managed | 15× faster | 50× faster | same | same |
| S3 Standard-IA | Ack: several zones · 5% cached in archil ssd · Your Glacier IR | 15× faster | 50× faster | same | same |
| S3 Glacier Instant Retrieval | Ack: several zones · no cache · Your Glacier IR | 15× faster | same | same | same |
| S3 Glacier Flexible Retrieval | Ack: several zones · no cache · Your Glacier IR | 15× faster | 576,000× faster | same | same |
| S3 Glacier Deep Archive | Ack: several zones · no cache · Your Glacier IR | 15× faster | 1,728,000× faster | 4.0× pricier | same |

Each verdict compares Archil with the product; “same” means within 25%, or half a nine. Archil’s several-zone write (2 ms, a 4 KiB `O_SYNC` write) and SSD read (500 µs, a 4 KiB read that misses the client cache) are medians from [our latency benchmark](https://docs.archil.com/reference/benchmarks/latency), which you can run yourself. The rest are modeled: an in-memory acknowledgement at 3 µs, a local-disk acknowledgement at 50 µs, a one-zone acknowledgement at 1 ms, a hit in client memory at 20 µs, a hit on the client’s local disk at 100 µs, and a cold read at 25 ms.

### Table 2. The products

| Product | w write | r read | c $/GB-month | d durability |
| --- | --- | --- | --- | --- |
| ElastiCache for Valkey | 300 µs | 300 µs | $9.8if full | None published; replication is asynchronousAcknowledged in memory, not durably. Cost: cache.r7g.large per GiB of memory |
| EC2 instance store (NVMe) | 30 µs | 100 µs | $0.098if full | Lost when the instance stops or fails (estimate)Cost: what a c6id.large charges over a c6i.large, $0.0158 an hour, for 118 GB of NVMe |
| EBS gp3 | 1 ms | 1 ms | $0.08if full | 99.8–99.9% a year |
| EBS io2 Block Express | 400 µs | 400 µs | $0.13if full | 99.999% a year |
| EBS st1 (HDD) | 6 ms | 8 ms | $0.045if full | 99.8–99.9% a yearBuilt for large sequential I/O; small random I/O waits on a seek |
| EBS sc1 (cold HDD) | 12 ms | 15 ms | $0.015if full | 99.8–99.9% a yearBuilt for large sequential I/O; small random I/O waits on a seek |
| Amazon EFS Standard | 2.7 ms | 1 ms | $0.3 | 11 nines, across AZs |
| RDS for PostgreSQL, Multi-AZ | 3 ms | 1.5 ms | $0.23if full | Not published; two EBS volumes in two AZs (estimate) |
| Aurora PostgreSQL | 3 ms | 1.5 ms | $0.1 | Not published; six copies across three AZs (estimate) |
| Amazon DynamoDB | 5 ms | 3 ms | $0.25 | Not published; three AZs (estimate) |
| Amazon MSK (Kafka, acks=all) | 6 ms | 3 ms | $0.3if full | Not published; acknowledged in memory on two or more brokers (estimate)Cost: $0.10 per GB-month of broker storage, times three replicas |
| S3 Express One Zone | 8 ms | 5 ms | $0.11 | 11 nines, within one AZMeasured from the next zone over: a 4 KiB PUT in 9.7 ms and GET in 6.8 ms (p50), about 2 ms of it the hop and the client |
| S3 Standard | 30 ms | 25 ms | $0.023 | 11 nines, across AZsMeasured: a 4 KiB PUT in 32 ms and GET in 28 ms (p50) |
| S3 Standard-IA | 30 ms | 25 ms | $0.013 | 11 nines, across AZs |
| S3 Glacier Instant Retrieval | 30 ms | 25 ms | $0.0040 | 11 nines, across AZs |
| S3 Glacier Flexible Retrieval | 30 ms | 4 h | $0.0036 | 11 nines, across AZsStandard retrieval: 3–5 hours |
| S3 Glacier Deep Archive | 30 ms | 12 h | $0.00099 | 11 nines, across AZsStandard retrieval: within 12 hours |

AWS publishes latencies for EBS, EFS, S3 Express One Zone (single-digit milliseconds), S3 Standard (tens of milliseconds for small requests) and Glacier restores. We timed 400 4 KiB PUTs and GETs against S3 Standard and S3 Express from a c7gn.2xlarge in us-east-1 to pin those two down; the rest are our estimates. AWS publishes no durability figure for RDS, Aurora, DynamoDB or MSK, so theirs are estimates from how each replicates. Cost is per GB of your data, after replication, and leaves out requests, IOPS and compute. Where you pay by the GB provisioned, it’s the price per GB of capacity, so it’s what a stored GB costs when the volume is full. Sources:

-   [Amazon EBS volume types](https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volume-types.html)
-   [Amazon EFS performance](https://docs.aws.amazon.com/efs/latest/ug/performance.html)
-   [S3 performance design patterns](https://docs.aws.amazon.com/AmazonS3/latest/userguide/optimizing-performance-design-patterns.html)
-   [S3 Express One Zone](https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-high-performance.html)
-   [S3 storage classes](https://aws.amazon.com/s3/storage-classes/)
-   [S3 Glacier retrieval options](https://docs.aws.amazon.com/AmazonS3/latest/userguide/restoring-objects-retrieval-options.html)
-   [EC2 on-demand pricing](https://aws.amazon.com/ec2/pricing/on-demand/)
-   [PlanetScale Metal](https://planetscale.com/metal)
-   [PlanetScale pricing](https://planetscale.com/pricing)
-   [Neon architecture](https://neon.com/docs/introduction/architecture-overview)
-   [Neon pricing](https://neon.com/pricing)
-   [turbopuffer architecture](https://turbopuffer.com/docs/architecture)
-   [turbopuffer performance](https://turbopuffer.com/docs/performance)
-   [turbopuffer pricing](https://turbopuffer.com/pricing)
-   [Archil latency benchmark](https://docs.archil.com/reference/benchmarks/latency)
-   [Archil file system benchmarks](https://docs.archil.com/reference/benchmarks/file-systems)
-   [Archil pricing](https://archil.com/pricing)
