---
title: "Architecture decisions in Neon"
description: "Neon built serverless Postgres by separating storage from compute without forking Postgres."
url: "https://swe.quest/articles/architecture-decisions-in-neon-01182afd96537274"
canonical: "https://neon.com/blog/architecture-decisions-in-neon"
source: "Neon"
published: "2022-07-08"
difficulty: "medium"
kind: "Case study"
reading_minutes: 9
tags: ["postgres","storage-engines","system-design","serverless","replication"]
---

# Architecture decisions in Neon

A post on [Neon](https://swe.quest/sources/neon.md), published 2022-07-08, 9 min read, Case study. Original: [https://neon.com/blog/architecture-decisions-in-neon](https://neon.com/blog/architecture-decisions-in-neon)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Storage engines](https://swe.quest/tags/storage-engines.md) (Data & databases)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [Replication](https://swe.quest/tags/replication.md) (Distributed systems)

## Prerequisites

- PostgreSQL WAL basics ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- OLTP database architecture ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))
- LSM trees ([easy posts on Storage engines](https://swe.quest/tags/storage-engines.md?difficulty=easy))

## Keywords

Neon, PostgreSQL, Amazon Aurora, safekeeper, pageserver, S3, point-in-time recovery

## Related posts

- [Deep dive into Neon storage engine](https://swe.quest/articles/deep-dive-into-neon-storage-engine-efc0ffc53406f34d.md): Neon · 2023-03-30 · Hard · 7 min read · Storage engines, PostgreSQL, Distributed databases, Serverless, Replication
  Neon's storage engine separates Postgres compute from storage and serves pages through GetPage@LSN, reconstructing any page as of any log sequence number from immutable layer files.
- [SELECT ’Hello, World’](https://swe.quest/articles/select-hello-world-151ac208b5f708c9.md): Neon · 2022-06-15 · Easy · 5 min read · PostgreSQL, Storage engines, Serverless, Cloud platforms, Multi-tenancy
  Neon is a serverless Postgres service built on separated storage and compute, launching behind a waitlist.
- [Point In Time Recovery Under the Hood in Serverless Postgres](https://swe.quest/articles/point-in-time-recovery-under-the-hood-in-serverless-postgres-81b0a26592d229ce.md): Neon · 2024-02-22 · Medium · 7 min read · PostgreSQL, Storage engines, Serverless, Replication
  Neon implements point-in-time recovery by treating Postgres as its WAL.
- [WAL + S3: Lakebase storage for the era of agents](https://swe.quest/articles/wal-s3-lakebase-storage-for-the-era-of-agents-3f04922da0e40ff3.md): Neon · 2026-08-24 · Hard · 15 min read · PostgreSQL, Storage engines, Storage systems, Data structures, Replication
  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.
- [Our Approach to High Availability](https://swe.quest/articles/our-approach-to-high-availability-0ddd5899b8c18a1c.md): Neon · 2024-10-25 · Easy · 5 min read · PostgreSQL, Replication, Resilience, Cloud platforms, Databases
  Neon treats high availability as a consequence of separating stateless compute from distributed storage rather than as a paid add-on.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
