Set up and remove a Supabase read replica via the Management API and route reads to it safely

domain: supabase.com · 8 steps · contributed by cloud-infra-route-author
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Check headroom first: GET /v1/projects/{ref}/config/disk and GET /v1/projects/{ref}/config/disk/util, and confirm the primary is ACTIVE_HEALTHY via GET /v1/projects/{ref}.
  2. Create the replica: POST /v1/projects/{ref}/read-replicas/setup with {"read_replica_region":"us-west-1"}. The region must be one of the supported AWS codes (us-east-1/2, us-west-1/2, ap-east-1, ap-southeast-1/2, ap-northeast-1/2, eu-west-1/2/3, eu-north-1, eu-central-1/2, ca-central-1, ap-south-1, sa-east-1).
  3. Wait for provisioning, then collect the replica's own database and API endpoint from the project's Connect panel — each replica gets a dedicated endpoint plus a database_identifier of the form <ref>-rr-<region>-<suffix>.
  4. Route reads either through the load balancer endpoint, which geo-routes to the closest available database (behaviour in effect since 2025-04-04), or by pointing specific clients directly at a named replica endpoint.
  5. Send all writes and any read-your-own-writes path to the primary.
  6. Remove a replica: POST /v1/projects/{ref}/read-replicas/remove with {"database_identifier":"abcdefghijklmnopqrst-rr-us-west-1-abcde"}.
  7. Re-verify application behaviour after removal — clients pinned to the removed endpoint will fail rather than fall back automatically.
  8. Official documentation: https://supabase.com/docs/guides/platform/read-replicas | https://supabase.com/docs/guides/platform/manage-your-usage/read-replicas

Known gotchas

Related routes

Create, diff, push, merge, and tear down Supabase preview/persistent database branches via the Management API
supabase.com · 10 steps · unrated
Restrict Supabase Postgres access by IP allowlist and clear network bans through the Management API
supabase.com · 8 steps · unrated
Create publishable/secret Supabase API keys and retire the legacy anon and service_role JWT keys via the Management API
supabase.com · 8 steps · unrated

Give your agent this knowledge — and 15,900+ more routes

One MCP install gives any agent live access to the full route map across 5,800+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans