Rethinking read replicas for the lakebase architecture
Lakebase Postgres implements read replicas as additional read-only computes attached to the same disaggregated storage as the primary, rather than as physical clones with their own volumes. Each replica boots from a slim base backup from the pageserver, streams WAL from Paxos-replicated safekeepers instead of the primary, and reads pages via GetPage@LSN. As a result, creation takes seconds regardless of database size, N replicas still means one copy of the data, and replicas autoscale and scale to zero with no WAL backlog to replay on wake. The post contrasts this with RDS replica provisioning (snapshot, volume hydration, streaming replication catch-up) and lists per-workload uses such as analytics, investigations, read-only agent access and background jobs.
Related posts
- Introducing Read Replicas
Supabase mediumAdeptSupabase now supports Postgres read replicas in 12 regions, up to two per project, for offloading reads and analytics, serving data closer to users, and redundancy. Replication combines native streaming replication for low lag with file-based WAL shipping as a fallback, reusing their PITR pipeline (WAL-G archiving to S3) so replicas that fall behind past wal_keep_size can still catch up. Each replica gets its own Supavisor connection pool and PostgREST instance, with a round-robin load-balancing endpoint. Pricing covers replica compute and disk plus $0.09/GB WAL transfer, and automatic failover, geo-routing and Supavisor read/write splitting are planned.
- Scaling Prisma applications with Neon read-only replicas
Neon mediumAdept
Neon read-only replicas are independent compute instances that read from the same shared storage as the read-write compute. Because no data is copied via WAL replay as in traditional Postgres, they add no storage cost and are up to date at startup. Prisma apps can route reads to them with the @prisma/extension-read-replicas Client extension, which picks a random replica when several URLs are given. Writes and $transaction queries go to the primary, and $primary() forces a read against the primary when fresh data is required.
- 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.
- Lakebase Postgres is built on object storage, but 99.99999% of reads never touch it
Neon mediumAdept
Lakebase Postgres stores durable history in object storage but keeps it off the read path through tiered caching. Production fleet stats show the compute's local cache serving ~1.1B page accesses/sec (99.46%), pageserver NVMe ~6M/sec (0.54%), and object storage only ~39 requests/sec, about 1 in 28 million reads, mostly from long-dormant project wakeups or branches and restores at old LSNs. Pageservers answer GetPage@LSN by replaying delta layers on top of the nearest image layer. Creating image layers more eagerly keeps p90 under 1 delta and p99 around 6 per read.
- Inside branch-based restores in Lakebase Postgres
Neon mediumAdept
Lakebase Postgres turns point-in-time restore into a metadata operation: creating a branch at a timestamp that points at existing immutable page history, rather than provisioning an instance, hydrating a snapshot from S3 and replaying WAL. Compute is decoupled from storage, which is split into safekeepers (quorum WAL durability), a pageserver that reconstructs any page at any LSN, and object storage holding immutable image and delta layers. As a result, restore time stays near-instant whether the database is 10 GB or 100 TB, past states can be queried before committing to a restore, and the operation is cheap enough for agent platforms to build undo and checkpoint features on.