Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Neon 5 min read Deep dive easyNovice

Our Approach to High Availability

Neon treats high availability as a consequence of separating stateless compute from distributed storage rather than as a paid add-on. Compute failures are handled by automatically restarting Postgres or recreating the VM from a pre-provisioned pool and reattaching the same endpoint, typically within seconds and without changing the connection string. On the storage side, Safekeepers replicate WAL across availability zones, secondary Pageservers keep synchronized copies of project data for failover, and cloud object storage holds the durable primary copy of all data. The same design applies on every plan, including the free tier.

Assumes: Postgres write-ahead logavailability zones

Related posts

  • Architecture decisions in Neon

    Neon mediumAdept

    Neon built serverless Postgres by separating storage from compute without forking Postgres. Postgres streams WAL over the network to a separate WAL service of safekeeper nodes, which use consensus for durability and to prevent split-brain. Multi-tenant pageservers rebuild any page version on request. All historical page versions are kept in immutable, LSM-inspired files that are compressed and offloaded to object storage like S3, which replaces traditional backups and WAL archives and makes point-in-time recovery and branching cheap.

  • How Neon's lakebase architecture stays resilient to cloud failures

    Neon mediumAdept

    Neon (and Databricks Lakebase) hardens its serverless Postgres against cloud failures by keeping Postgres compute stateless over zone-redundant storage, so failed computes are replaced instantly without hot standbys or WAL replay. Because agents now start tens of millions of databases daily, the start/suspend path of the control plane is being split into a minimal-dependency data plane controller. Further measures include avoiding cloud provider control planes on the hot path via pre-allocated bare-metal pools and a custom autoscaling virtualization layer, and cell-based regions that limited a May 2026 us-east-1 AZ incident to ~13% of databases. Chaos testing, whole-AZ disconnect simulations targeting under 30s of downtime, and per-database SLIs with 99.99% monthly attainment tracking round out the approach.

  • What it Takes to Recover a 100 TB Postgres Database in AWS RDS

    Neon easyNovice

    Recovering a 100 TB Postgres database on AWS RDS is slow or incomplete depending on the failure mode. Snapshot restore plus WAL replay handles logical errors, but copying the snapshot and replaying up to a day of WAL can take hours. Multi-AZ standbys cover AZ and hardware failures but cannot undo bad writes, double instance costs, and may silently drop to asynchronous replication and lag under heavy writes. Neon's alternative is presented: a versioned, log-structured key-value storage layer separated from stateless compute, which allows instant branch-based PITR and storage-level multi-AZ redundancy without a standby replica.

  • SELECT ’Hello, World’

    Neon easyNovice

    Neon is a serverless Postgres service built on separated storage and compute, launching behind a waitlist. Each user gets a containerized Postgres compute node, while data lives in a multi-tenant Rust storage layer: Safekeepers run a consensus protocol and, together with S3, form the system of record, and Pageservers serve pages with low latency as disposable scratch space. Avoiding EBS in favour of local disk for hot data and S3 for cold data cuts the cost of triple-replicated storage and compute. Stateless compute also enables scale-to-zero, roughly 3-second provisioning, and copy-on-write database branching for CI/CD workflows, all released under Apache 2.0.

  • WAL + S3: Lakebase storage for the era of agents

    Neon hardMaster

    Lakebase Postgres (Neon's architecture) treats the Postgres write-ahead log as the source of truth and data pages as a derived cache, splitting the system into stateless compute running unmodified Postgres and a storage layer of Paxos-replicated safekeepers, pageservers, and S3. Commits are acknowledged once a quorum of safekeepers has the WAL, while pageservers asynchronously materialize immutable image and delta layers into object storage and serve GetPage@LSN requests by replaying WAL onto the nearest image. Finding the right layer among tens of millions uses a persistent binary search tree with path copying, so historical reads at any LSN cost the same as latest reads. Because queries hit RAM, local NVMe, then the pageserver, and never S3 directly, the design avoids object-storage latency while making branching, instant point-in-time restore, and time-travel queries pointer operations whose cost does not depend on database size.

The quest for software engineering knowledge.

Look:
Layout: