Skip to content

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

Supabase 6 min read Announcement mediumAdept

Introducing Read Replicas

Supabase 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.

Related posts

  • Rethinking read replicas for the lakebase architecture

    Neon mediumAdept

    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.

  • When to use Read Replicas vs. bigger compute

    Supabase mediumAdept

    Choosing between vertical scaling and Postgres Read Replicas comes down to diagnosing the bottleneck first, using pg_stat_statements, read/write ratio queries, CPU utilization and EXPLAIN ANALYZE. Upgrade compute for write-heavy workloads, simple fixes with no code changes, or when tier headroom remains. Add replicas to isolate analytics, serve distant regions, or scale reads past the 16XL ceiling. Worked cost comparisons show replicas becoming more cost-effective at higher tiers. Long analytics queries on replicas need tuning of max_standby_streaming_delay, with hot_standby_feedback as a last resort because it bloats the primary. Connection pooling, CDC-based Pipelines and Multigres sharding are covered as alternatives.

  • Data API Routes to Nearest Read Replica

    Supabase easyNovice

    Supabase's API load balancer now routes read-only Data API (PostgREST) requests to the geographically nearest Postgres read replica. It takes the edge datacenter's IATA code from Cloudflare's `cf.colo` property, maps replica regions to coordinates, computes Haversine great-circle distance to pick the closest replica, and round-robins when several replicas share a region. Geo-routing applies automatically when using the `<project_ref>-all.supabase.co` load balancer endpoint, with Auth, Storage and Realtime support planned.

  • Supavisor 1.0: a scalable connection pooler for Postgres

    Supabase mediumAdept

    Supavisor 1.0, Supabase's Elixir-based Postgres connection pooler, is production-ready and adds query load balancing, named prepared statement support in transaction mode, and query cancelation. All SQL is now parsed via pg_query.rs through Rustler. Reads are randomly spread across primary and replicas, while writes find the primary by probing until a write succeeds, which adds a few milliseconds but makes failover transparent. PREPARE statements are broadcast to all backend connections, trading some memory for throughput. The release also raises default client limits for smaller projects and uses IPv4-to-IPv6 mediation to avoid AWS IPv4 charges.

  • 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.

The quest for software engineering knowledge.

Look:
Layout: