The $400 Database That Charged You to Sleep: How Neon and PlanetScale Finally Split Postgres From Its Own Hard Drive
๐Ÿ—๏ธSystem DesignDecember 6, 2026 at 3:18 AMยท8 min read

The $400 Database That Charged You to Sleep: How Neon and PlanetScale Finally Split Postgres From Its Own Hard Drive

For 50 years, a database was a machine โ€” you provisioned it, paid for it 24/7, and prayed it didn't fall over on Black Friday. Then a handful of engineers asked a heretical question: what if storage and compute didn't have to live in the same box?

System DesignDatabasesPostgresCloud InfrastructureNeonPlanetScale

3:14 AM, Somewhere on AWS

It's 3:14 AM and an on-call engineer's phone is screaming. Not because traffic spiked โ€” because it didn't. A staging RDS instance, db.r5.2xlarge, has been sitting idle since Friday at 6 PM, running nobody's queries, serving nobody's requests, and the AWS bill for the weekend just hit four figures. Nobody will ever query it until Monday morning. It doesn't matter. Postgres doesn't know the difference between a database serving ten thousand requests a second and one serving zero. It just knows it's a machine, and machines run, and running costs money.

This was the quiet, absurd tax that every company running a relational database had paid since the 1970s. You provisioned a box. You sized it for your worst day, not your average one. You paid for the 2 AM Tuesday the way you paid for the Black Friday spike. And when you actually did outgrow it, the solution wasn't elegant โ€” it was manual sharding, read replicas with replication lag that silently served stale data, and migration weekends fueled by cold pizza and Slack threads titled 'IS PROD DOWN.'

The cloud was supposed to fix this. EC2 fixed it for compute โ€” spin up a box, pay by the second, kill it when you're done. S3 fixed it for storage โ€” pay for bytes, not drives. But the database, the single most important piece of infrastructure in most companies, stayed stubbornly machine-shaped for fifteen extra years. Compute and storage were welded together inside the same instance, because for half a century the assumption baked into every database engine was simple: the network is slow, so keep your data close to your CPU.

The Paper That Started the Unbundling

In 2014, a team inside AWS led by Anurag Gupta quietly shipped something called Aurora, and in 2017 they published the paper that would become the blueprint for the next decade of database architecture: 'Amazon Aurora: Design Considerations for High Throughput Cloud-Native Relational Databases,' presented at SIGMOD. The radical idea buried in that paper was deceptively simple โ€” what if the database engine only sent the write-ahead log over the network, and a separate, purpose-built, massively distributed storage layer handled turning that log into actual data pages? Compute (the thing running your SQL) and storage (the thing holding your bytes) didn't need to be the same machine anymore. They just needed a fast enough network between them.

Aurora proved it worked at scale for MySQL and Postgres compatibility layers. But Aurora was still, fundamentally, AWS renting you a bigger, smarter box. The next generation of founders looked at that paper and asked: what if we took the idea all the way? What if compute could scale to zero? What if storage could be branched like a git repo?

Neon: Postgres That Forgets It's a Machine

Neon, founded by Nikita Shamgunov (former CTO of SingleStore) and a team of ex-database-kernel engineers, rebuilt Postgres's storage engine from the ground up around three components.

First, the Safekeeper โ€” a Paxos-replicated write-ahead log service. When your application commits a transaction, Postgres doesn't write to a local disk. It ships the WAL record to three Safekeepers across availability zones, gets a quorum ack, and only then tells your app 'committed.' Durability now lives in consensus, not in a single disk controller that might die.

Second, the Page Server โ€” a bottomless, cloud-native storage layer that ingests the WAL stream and reconstructs Postgres data pages, indexed by LSN (Log Sequence Number, Postgres's own internal clock for 'how far has this log progressed'). Hot pages live on NVMe for speed. Cold pages get pushed to S3. Critically, the Page Server doesn't just store the current version of each page โ€” it stores page versions. Every write creates a new version, timestamped by LSN, rather than overwriting the old one.

Third, Compute โ€” and this is the part that breaks people's intuition about databases. Neon's Postgres compute nodes are stateless. They don't own a data directory on local disk; they mount the Page Server as their storage backend over the network. That means a compute node can boot from cold in about 500 milliseconds, because it's not restoring a 2TB disk image โ€” it's just connecting to storage that already has everything. And when a database sits idle for five minutes, Neon kills the compute process entirely. No compute, no bill. The data just sits in the Page Server, waiting.

This architecture unlocks three primitives that sound like magic tricks until you see the mechanism:

Branching. Because pages are versioned by LSN and storage is copy-on-write, forking an entire database โ€” terabytes of it โ€” takes milliseconds. You're not copying bytes; you're just creating a new pointer into the same version history. Engineers branch a production database to test a migration against real data, break it on purpose, and throw it away without touching prod.

Time travel. Because old page versions aren't deleted, you can literally run SELECT * FROM users AS OF TIMESTAMP '2024-01-15 09:00:00' and get an honest answer, not a backup restore that takes forty minutes.

Instant scaling with zero replication lag. Spin up five more compute nodes during a traffic spike, point them at the same Page Server, and they're reading the exact same pages โ€” not a replica with eventual consistency, not a read-replica flapping two seconds behind primary. It's the same storage, just more CPUs looking at it.

PlanetScale: Vitess, Grown Up

While Neon rebuilt Postgres from first principles, PlanetScale took a different, battle-tested road for MySQL: Vitess, the sharding middleware YouTube built in 2010 to keep MySQL alive under a billion daily views, later open-sourced and adopted by Slack, Square, and GitHub.

Vitess sits between your application and a fleet of sharded MySQL instances, making thousands of physical shards look like one logical database. PlanetScale, founded by Vitess's original creators Jiten Vaidya and Sugu Sougoumarane, wrapped that engine in a developer experience that feels like Neon's โ€” branches, not boxes.

The killer feature is PlanetScale's non-blocking schema changes. Historically, running ALTER TABLE on a MySQL table with a billion rows meant locking it for hours, or risking a replication-breaking disaster. GitHub solved this internally with a tool called gh-ost, which performs the migration by shadow-copying the table, replaying changes via the binlog, and atomically cutting over โ€” all without locking the table. PlanetScale builds this directly into its platform: you open a branch, write your migration, PlanetScale runs it live against production-scale data in the background, and a 'deploy request' merges the schema with zero downtime. It's pull requests, but for your database schema.

The Rest of the Field

The pattern caught fire everywhere. Aurora Serverless v2 keeps a warm pool of pre-booted Postgres/MySQL processes so it can autoscale between 0.5 and 256 ACUs in under a second. Turso took libSQL (a fork of SQLite) and pushed it to the edge, embedding read replicas directly inside your application process so reads never leave the machine. Cloudflare's D1 does something similar โ€” SQLite databases that live at the edge, provisioned serverlessly, billed by query. Xata put Postgres on top of S3-style storage with built-in search indexing, chasing the same decoupling dream for a different audience.

Under every one of these sits the same two words: log-structured storage plus shared-nothing compute. Snowflake proved this model for analytics warehouses years earlier, separating virtual warehouses from stored data so you could scale query power without touching your bytes. Aurora proved it for transactional workloads. Neon and PlanetScale are proving it's viable even for the messiest, most latency-sensitive corner of the stack: the primary OLTP database your whole app depends on.

The Honest Trade-offs

None of this is free. Cold starts are real โ€” the first query after five minutes of silence can take one to three seconds while compute reattaches to storage, which is lethal for a latency-sensitive API endpoint expecting single-digit milliseconds. Long-lived connections get weird: your compute process can be recycled underneath a connection pool that assumed it was talking to the same immutable machine all along. And you lose decades of OS-level tricks โ€” no inotify watching local files, no shared memory segments between processes, no assuming the disk is actually a disk.

The Legacy

The network stopped being the bottleneck somewhere around 2015 and nobody updated the database accordingly for another five years. Compute and storage were welded together for half a century because splitting them meant a round trip over a network that used to be too slow to trust. That excuse is gone. Today a page fetch from a remote NVMe-backed storage tier can beat a local spinning disk from a decade ago.

Somewhere, that staging RDS instance is still running at 3 AM, burning money for nobody. But increasingly, it's the exception, not the rule โ€” a relic of an architecture that treated 'database' and 'machine' as synonyms. By 2030, paying 24/7 for an idle Postgres box will look the way paying for a dedicated CD-ROM drive looks today: technically functional, quaintly unnecessary, and a little bit insane that we ever accepted it as normal.

โœ๏ธ
Written by Swayam Mohanty
Untold stories behind the tech giants, legendary moments, and the code that changed the world.

Keep Reading