diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
index 3fc9fd46474..32f962ab7f6 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
@@ -1286,6 +1286,7 @@ export const platform: NavMenuConstant = {
{ name: 'Compute Add-ons', url: '/guides/platform/compute-add-ons' },
{ name: 'Custom Domains', url: '/guides/platform/custom-domains' },
{ name: 'Database Backups', url: '/guides/platform/backups' },
+ { name: 'Read Replicas', url: '/guides/platform/read-replicas' },
],
},
{
diff --git a/apps/docs/pages/guides/platform/read-replicas.mdx b/apps/docs/pages/guides/platform/read-replicas.mdx
new file mode 100644
index 00000000000..6e8b7fe9505
--- /dev/null
+++ b/apps/docs/pages/guides/platform/read-replicas.mdx
@@ -0,0 +1,157 @@
+import Layout from '~/layouts/DefaultGuideLayout'
+import { Admonition } from 'ui'
+
+export const meta = {
+ title: 'Read Replicas',
+ description: 'Spin up additional read-only databases for your project.',
+ subtitle: 'Spin up additional read-only databases for your project',
+}
+
+
+
+To try out read replicas, [request access here](https://forms.supabase.com/read-replica).
+
+
+
+Read replicas continuously replicate data from a primary database. You can both read and write data on a primary database, but you can _only_ read (for example, use `select` statements), and not write, on a read replica.
+
+| | select | insert | update | delete |
+| ------------ | ------ | ------ | ------ | ------ |
+| Primary | ✅ | ✅ | ✅ | ✅ |
+| Read Replica | ✅ | - | - | - |
+
+When you create a project, the automatically created database is considered the primary database. If you then add read replicas, they will receive and synchronize data from this primary database. Replication is asynchronous. It happens in the background, so transactions on the primary aren't blocked. The time delay between writing data to the primary and the read replica receiving the change is called replication lag.
+
+Read replicas have many applications:
+
+- They reduce read load on the primary database.
+ - For example, you can use a read replica for complex analytical queries and reserve the primary for user-facing create, update, and delete operations.
+- For projects that need to cover a global audience, additional databases can be spun up closer to users in any of our twelve supported regions to reduce latency.
+- Read replicas provide data redundancy.
+
+## How are Read Replicas made?
+
+We use a hybrid approach to replicate data from a primary to its read replicas, combining the native methods of streaming replication and file-based log shipping.
+
+### Streaming replication
+
+Postgres generates a Write Ahead Log (WAL) as database changes occur. With streaming replication, these changes stream from the primary to the read replica server. The WAL alone is sufficient to reconstruct the database to its current state.
+
+This replication method is fast, since changes are streamed directly from the primary to the read replica. On the other hand, it faces challenges when the read replica can't keep up with the WAL changes from its primary. This can happen when the read replica is too small, running on degraded hardware, or has a heavier workload running.
+
+To address this, Postgres does provide tunable configuration, like `wal_keep_size`, to adjust the WAL retained by the primary. If the read replica fails to “catch up” before the WAL surpasses the `wal_keep_size` setting, the replication is terminated. Tuning is a bit of an art - the amount of WAL required is variable for every situation.
+
+### File-based log shipping
+
+In this replication method, the primary continuously buffers WAL changes to a local file and then sends the file to the read replica. If multiple read replicas are present, files could also be sent to an intermediary location accessible by all. The read replica then reads the WAL files and applies those changes. There is higher replication lag than streaming replication since the primary buffers the changes locally first. It also means there is a small chance that WAL changes do not reach read replicas if the primary goes down before the file is transferred. In these cases, if the primary fails a replica using streaming replication would (in most cases) be more up-to-date than a replica using file-based log shipping.
+
+### File-based log shipping 🤝 Streaming replication
+
+
+
+
+
+ How replication is achieved.
+
+
+
+We bring these two methods together to achieve quick, stable, and reliable replication. Each method addresses the limitations of the other. Streaming replication minimizes replication lag, while file-based log shipping provides a fallback. For file-based log shipping, we use our existing Point In Time Recovery (PITR) infrastructure. We regularly archive files from the primary using [WAL-G](https://github.com/wal-g/wal-g), an open source archival and restoration tool, and ship the WAL files to S3.
+
+We combine it with streaming replication to reduce replication lag. Once WAL-G files have been synced from S3, read replicas connect to the primary and stream the WAL directly.
+
+## Getting started
+
+
+
+
+
+
+
+
+Read replicas can be managed from the [infrastructure settings page](https://supabase.com/dashboard/project/_/settings/infrastructure). For now, each project can only spin up to two read replicas. Read replicas also inherit the compute size of their primary database.
+
+Read replicas offer the following features:
+
+### Dedicated endpoints
+
+Each read replica has its own dedicated database and API endpoints. The database endpoint can be found in your [dashboard database settings](https://supabase.com/dashboard/project/_/settings/database) under **Connection info**. The API endpoint can be found in [dashboard API settings](https://supabase.com/dashboard/project/_/settings/api) under **Project URL**.
+
+A read replica's API endpoint only supports `GET` requests to the [REST API](https://supabase.com/docs/guides/api). Requests towards other Supabase products, such as Auth, Storage, and Realtime are not able to utilize a read replica nor its API endpoint for now. We are working on adding read replica support for them.
+
+### Dedicated connection pool
+
+A connection pool through Supavisor is also available for each read replica. Its unique connection string can be found in your [dashboard database settings](https://supabase.com/dashboard/project/_/settings/database) under **Connection Pooling Custom Configuration**.
+
+### Querying through the SQL editor
+
+
+
+
+
+
+
+
+In the SQL editor, you can choose if you want to run the query on the primary or one of the replicas.
+
+### API load balancer
+
+When read replicas are spun up, an API load balancer becomes available for the project. An endpoint for it is provisioned and can be found [here](https://supabase.com/dashboard/project/_/settings/api).
+
+The load balancer uses a round-robin strategy to route `GET` requests to any of the API endpoints available, including that of the primary database. Non-`GET` requests can also be sent through this endpoint. They are immediately redirected to the primary database.
+
+Similar to the read replica API endpoints, only requests to the REST API are available for now. Support for other Supabase products will become available once read replica support has been completed for them.
+
+When a project no longer has any read replicas, the load balancer and its endpoint are brought down as well.
+
+### Centralized configuration management
+
+All settings made through the dashboard will be propagated across all databases of a project. This ensures that no read replica get out of sync with its primary database or with other read replicas.
+
+## Limitations
+
+### Prerequisites for using read replicas
+
+A project needs to satisfy these requirements to spin up a read replica:
+
+1. Running on AWS.
+ - Support for projects on Fly is in progress.
+2. Running on at least a small compute.
+3. PostgreSQL 15.
+ - For projects running on older versions of PostgreSQL, you can initiate self-serve upgrades with pg_upgrade. For details, see the [upgrade guide](/docs/guides/platform/migrating-and-upgrading-projects#pgupgrade).
+
+### Read replicas need to be brought down before starting the following procedures
+
+The following procedures require all read replicas for a project to be brought down before they can be started:
+
+1. Upgrading a project via pg_upgrade.
+2. Performing data restoration.
+
+Changes made to the primary database during these operations heavily disrupt replication and potentially leave active read replicas in unstable states. Once these operations complete, read replicas can be spun back up.
+
+export const Page = ({ children }) =>
+
+export default Page
diff --git a/apps/docs/public/img/guides/platform/read-replicas/map-view.png b/apps/docs/public/img/guides/platform/read-replicas/map-view.png
new file mode 100644
index 00000000000..afa1b17f1d7
Binary files /dev/null and b/apps/docs/public/img/guides/platform/read-replicas/map-view.png differ
diff --git a/apps/docs/public/img/guides/platform/read-replicas/sql-editor.png b/apps/docs/public/img/guides/platform/read-replicas/sql-editor.png
new file mode 100644
index 00000000000..09e3efc24f2
Binary files /dev/null and b/apps/docs/public/img/guides/platform/read-replicas/sql-editor.png differ
diff --git a/apps/docs/public/img/guides/platform/read-replicas/streaming-replication-dark.png b/apps/docs/public/img/guides/platform/read-replicas/streaming-replication-dark.png
new file mode 100644
index 00000000000..d596e61e30f
Binary files /dev/null and b/apps/docs/public/img/guides/platform/read-replicas/streaming-replication-dark.png differ
diff --git a/apps/docs/public/img/guides/platform/read-replicas/streaming-replication-light.png b/apps/docs/public/img/guides/platform/read-replicas/streaming-replication-light.png
new file mode 100644
index 00000000000..9a6ff9e08bc
Binary files /dev/null and b/apps/docs/public/img/guides/platform/read-replicas/streaming-replication-light.png differ
diff --git a/apps/www/_blog/2023-04-10-supabase-logs-self-hosted.mdx b/apps/www/_blog/2023-04-10-supabase-logs-self-hosted.mdx
index ec9c8bb0b23..e40b7535f9e 100644
--- a/apps/www/_blog/2023-04-10-supabase-logs-self-hosted.mdx
+++ b/apps/www/_blog/2023-04-10-supabase-logs-self-hosted.mdx
@@ -30,7 +30,7 @@ To expose log data to customers, we leverage Logflare Endpoints. This provides a
src="https://www.youtube-nocookie.com/embed/Ai2BjHV36Ng"
title="YouTube video player"
frameborder="0"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
>
diff --git a/apps/www/_blog/2023-04-11-edge-runtime-self-hosted-deno-functions.mdx b/apps/www/_blog/2023-04-11-edge-runtime-self-hosted-deno-functions.mdx
index c5578235cf9..7c3c4591cb8 100644
--- a/apps/www/_blog/2023-04-11-edge-runtime-self-hosted-deno-functions.mdx
+++ b/apps/www/_blog/2023-04-11-edge-runtime-self-hosted-deno-functions.mdx
@@ -30,7 +30,7 @@ Edge Runtime is MIT licensed, written in Rust, and based on the latest Deno Runt
src="https://www.youtube-nocookie.com/embed/cPGxPl1lx4Y"
title="YouTube video player"
frameborder="0"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
>
diff --git a/apps/www/_blog/2023-04-12-storage-v3-resumable-uploads.mdx b/apps/www/_blog/2023-04-12-storage-v3-resumable-uploads.mdx
index 019c68ff437..cfbb0b5aff2 100644
--- a/apps/www/_blog/2023-04-12-storage-v3-resumable-uploads.mdx
+++ b/apps/www/_blog/2023-04-12-storage-v3-resumable-uploads.mdx
@@ -111,7 +111,7 @@ For example, you can restrict your users a 1 MB and `image/*` files when uploadi
src="https://www.youtube-nocookie.com/embed/pT2PcZFq_M0"
title="YouTube video player"
frameborder="0"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
>
diff --git a/apps/www/_blog/2023-04-13-supabase-auth-sso-pkce.mdx b/apps/www/_blog/2023-04-13-supabase-auth-sso-pkce.mdx
index cc26b2bb8f4..c9b863c7c5a 100644
--- a/apps/www/_blog/2023-04-13-supabase-auth-sso-pkce.mdx
+++ b/apps/www/_blog/2023-04-13-supabase-auth-sso-pkce.mdx
@@ -34,7 +34,7 @@ Building SSO into your application isn't necessarily hard, but does come with so
src="https://www.youtube-nocookie.com/embed/hAwJeR6mhB0"
title="YouTube video player"
frameborder="0"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
>
diff --git a/apps/www/_blog/2023-04-14-launch-week-7-community-highlights.mdx b/apps/www/_blog/2023-04-14-launch-week-7-community-highlights.mdx
index 8ce26a9db5c..5bb4d6cacb3 100644
--- a/apps/www/_blog/2023-04-14-launch-week-7-community-highlights.mdx
+++ b/apps/www/_blog/2023-04-14-launch-week-7-community-highlights.mdx
@@ -91,7 +91,7 @@ This Launch Week had a big focus on self-hosting, adding support for self-hosted
src="https://www.youtube-nocookie.com/embed/dDhy6pk282U"
title="YouTube video player"
frameborder="0"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
>
diff --git a/apps/www/_blog/2023-04-14-supabase-studio-2.0.mdx b/apps/www/_blog/2023-04-14-supabase-studio-2.0.mdx
index 9471ef14ef9..28ff98e5edd 100644
--- a/apps/www/_blog/2023-04-14-supabase-studio-2.0.mdx
+++ b/apps/www/_blog/2023-04-14-supabase-studio-2.0.mdx
@@ -23,7 +23,7 @@ Today we're announcing Supabase Studio 2.0, packed with a ton of new stuff. We h
src="https://www.youtube-nocookie.com/embed/0rcNqHt5KWU"
title="YouTube video player"
frameBorder="0"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
>
diff --git a/apps/www/_blog/2023-05-15-building-chatgpt-plugins-template.mdx b/apps/www/_blog/2023-05-15-building-chatgpt-plugins-template.mdx
index b9f1fde47f1..8cca833e100 100644
--- a/apps/www/_blog/2023-05-15-building-chatgpt-plugins-template.mdx
+++ b/apps/www/_blog/2023-05-15-building-chatgpt-plugins-template.mdx
@@ -24,7 +24,7 @@ Want to get started right away? [Fork the template on GitHub](https://github.com
src="https://www.youtube-nocookie.com/embed/4pa-eEXQHJQ"
title="YouTube video player"
frameborder="0"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
>
diff --git a/apps/www/_blog/2023-05-29-flutter-hackathon-winners.mdx b/apps/www/_blog/2023-05-29-flutter-hackathon-winners.mdx
index ae4368f78c9..a9240b846a3 100644
--- a/apps/www/_blog/2023-05-29-flutter-hackathon-winners.mdx
+++ b/apps/www/_blog/2023-05-29-flutter-hackathon-winners.mdx
@@ -23,7 +23,7 @@ Now, without further ado, let's look at some of our favorites in more detail:
src="https://www.youtube-nocookie.com/embed/AazB9mQetkw"
title="YouTube video player"
frameborder="0"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
>
diff --git a/apps/www/_blog/2023-08-07-hugging-face-supabase.mdx b/apps/www/_blog/2023-08-07-hugging-face-supabase.mdx
index a5c9cc12d79..475850ab359 100644
--- a/apps/www/_blog/2023-08-07-hugging-face-supabase.mdx
+++ b/apps/www/_blog/2023-08-07-hugging-face-supabase.mdx
@@ -28,7 +28,7 @@ We’ve added support in our [Python Vector Client](https://supabase.com/docs/gu
src="https://www.youtube-nocookie.com/embed/RJccSbJ9Go4"
title="YouTube video player"
frameborder="0"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
>
diff --git a/apps/www/_blog/2023-08-08-supabase-local-dev.mdx b/apps/www/_blog/2023-08-08-supabase-local-dev.mdx
index 17560e912a2..d22493440de 100644
--- a/apps/www/_blog/2023-08-08-supabase-local-dev.mdx
+++ b/apps/www/_blog/2023-08-08-supabase-local-dev.mdx
@@ -24,7 +24,7 @@ We received feedback recently about our local development experience, encouragin
src="https://www.youtube-nocookie.com/embed/N0Wb85m3YMI"
title="YouTube video player"
frameborder="0"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
>
diff --git a/apps/www/_blog/2023-08-09-supabase-studio-3-0.mdx b/apps/www/_blog/2023-08-09-supabase-studio-3-0.mdx
index 1554e92f1b4..82c3b2e1058 100644
--- a/apps/www/_blog/2023-08-09-supabase-studio-3-0.mdx
+++ b/apps/www/_blog/2023-08-09-supabase-studio-3-0.mdx
@@ -24,7 +24,7 @@ Supabase Studio 3.0 is here, with some huge new features, including a brand new
src="https://www.youtube-nocookie.com/embed/51tCMQPiitQ"
title="YouTube video player"
frameBorder="0"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
>
diff --git a/apps/www/_blog/2023-08-10-supabase-integrations-marketplace.mdx b/apps/www/_blog/2023-08-10-supabase-integrations-marketplace.mdx
index 108faca81cd..14adfca1175 100644
--- a/apps/www/_blog/2023-08-10-supabase-integrations-marketplace.mdx
+++ b/apps/www/_blog/2023-08-10-supabase-integrations-marketplace.mdx
@@ -89,7 +89,7 @@ We've released full instructions in our [Build with Supabase](https://supabase.c
src="https://www.youtube-nocookie.com/embed/gtJo1lTxHfs"
title="YouTube video player"
frameBorder="0"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
>
diff --git a/apps/www/_blog/2023-08-10-using-supabase-with-vercel.mdx b/apps/www/_blog/2023-08-10-using-supabase-with-vercel.mdx
index 2c60cfd6d4d..d47a6c13762 100644
--- a/apps/www/_blog/2023-08-10-using-supabase-with-vercel.mdx
+++ b/apps/www/_blog/2023-08-10-using-supabase-with-vercel.mdx
@@ -95,7 +95,7 @@ The new App Router in Next.js adds a lot of exciting features, like React Suspen
src="https://www.youtube-nocookie.com/embed/w3LD0Z73vgU"
title="YouTube video player"
frameBorder="0"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
>
diff --git a/apps/www/_blog/2023-08-11-supavisor-1-million.mdx b/apps/www/_blog/2023-08-11-supavisor-1-million.mdx
index d80707a356a..43286a0a7fc 100644
--- a/apps/www/_blog/2023-08-11-supavisor-1-million.mdx
+++ b/apps/www/_blog/2023-08-11-supavisor-1-million.mdx
@@ -344,7 +344,7 @@ If you are interested in exploring Supavisor's potential or want to implement it
src="https://www.youtube-nocookie.com/embed/qzxzLSAJDfE"
title="YouTube video player"
frameBorder="0"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
>
diff --git a/apps/www/_blog/2023-12-01-automatic-cli-login.mdx b/apps/www/_blog/2023-12-01-automatic-cli-login.mdx
index c6353d725ee..076e7347f3f 100644
--- a/apps/www/_blog/2023-12-01-automatic-cli-login.mdx
+++ b/apps/www/_blog/2023-12-01-automatic-cli-login.mdx
@@ -29,7 +29,7 @@ When you type `supabase login`, several things occur. First, a random UUID is ge
src="https://www.youtube-nocookie.com/embed/lNgsIITU3pc?si=X6KE7X819Hk"
title="YouTube video player"
frameBorder="0"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
>
diff --git a/apps/www/_blog/2023-12-11-studio-introducing-assistant.mdx b/apps/www/_blog/2023-12-11-studio-introducing-assistant.mdx
index 72a0449aa88..186cad7b9e7 100644
--- a/apps/www/_blog/2023-12-11-studio-introducing-assistant.mdx
+++ b/apps/www/_blog/2023-12-11-studio-introducing-assistant.mdx
@@ -24,7 +24,7 @@ Today, we're introducing the Supabase Assistant, an AI side-kick inside the dash
className="w-full"
src="https://www.youtube-nocookie.com/embed/hu2SQjvCXIw"
title="YouTube video player"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
/>
diff --git a/apps/www/_blog/2023-12-12-edge-functions-node-npm.mdx b/apps/www/_blog/2023-12-12-edge-functions-node-npm.mdx
index c44165ab04c..8034648b9bd 100644
--- a/apps/www/_blog/2023-12-12-edge-functions-node-npm.mdx
+++ b/apps/www/_blog/2023-12-12-edge-functions-node-npm.mdx
@@ -32,7 +32,7 @@ We created a demo to show how to migrate a Node app that uses Express, Node Post
className="w-full"
src="https://www.youtube-nocookie.com/embed/eCbiywoDORw"
title="YouTube video player"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
/>
diff --git a/apps/www/_blog/2023-12-13-supabase-branching.mdx b/apps/www/_blog/2023-12-13-supabase-branching.mdx
index 820746544e1..94149bad141 100644
--- a/apps/www/_blog/2023-12-13-supabase-branching.mdx
+++ b/apps/www/_blog/2023-12-13-supabase-branching.mdx
@@ -27,7 +27,7 @@ We're operating on a first-signed-up, first-served basis, rolling it out in batc
className="w-full"
src="https://www.youtube-nocookie.com/embed/peXKxavGnBo"
title="YouTube video player"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
/>
diff --git a/apps/www/_blog/2023-12-13-supavisor-postgres-connection-pooler.mdx b/apps/www/_blog/2023-12-13-supavisor-postgres-connection-pooler.mdx
index 42d9cc8e6f2..04d487edb73 100644
--- a/apps/www/_blog/2023-12-13-supavisor-postgres-connection-pooler.mdx
+++ b/apps/www/_blog/2023-12-13-supavisor-postgres-connection-pooler.mdx
@@ -34,7 +34,7 @@ Supavisor is built with Elixir. Since the [Dashbit](https://dashbit.co/) team ha
className="w-full"
src="https://www.youtube-nocookie.com/embed/ogYNmJOFEpk"
title="YouTube video player"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
/>
diff --git a/apps/www/_blog/2023-12-14-supabase-auth-identity-linking-hooks.mdx b/apps/www/_blog/2023-12-14-supabase-auth-identity-linking-hooks.mdx
index 40b0b62b9c1..20b6461b98e 100644
--- a/apps/www/_blog/2023-12-14-supabase-auth-identity-linking-hooks.mdx
+++ b/apps/www/_blog/2023-12-14-supabase-auth-identity-linking-hooks.mdx
@@ -27,7 +27,7 @@ We're excited to announce four new features for Supabase Auth:
className="w-full"
src="https://www.youtube-nocookie.com/embed/LF8GABnAFyE"
title="YouTube video player"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
/>
diff --git a/apps/www/_blog/2023-12-15-client-libraries-v2.mdx b/apps/www/_blog/2023-12-15-client-libraries-v2.mdx
index 1a45cb1a4bf..299a073671b 100644
--- a/apps/www/_blog/2023-12-15-client-libraries-v2.mdx
+++ b/apps/www/_blog/2023-12-15-client-libraries-v2.mdx
@@ -94,7 +94,7 @@ We’ve [worked with the Expo team](https://docs.expo.dev/guides/using-supabase/
className="w-full"
src="https://www.youtube-nocookie.com/embed/7DYZdAPPJOw"
title="YouTube video player"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"
allowfullscreen
/>
diff --git a/apps/www/_blog/2023-12-15-introducing-read-replicas.mdx b/apps/www/_blog/2023-12-15-introducing-read-replicas.mdx
new file mode 100644
index 00000000000..dbc99a9bc57
--- /dev/null
+++ b/apps/www/_blog/2023-12-15-introducing-read-replicas.mdx
@@ -0,0 +1,141 @@
+---
+title: 'Introducing Read Replicas'
+description: 'We are launching support for Postgres Read Replicas'
+launchweek: x
+categories:
+ - product
+tags:
+ - launch-week
+ - postgres
+date: '2023-12-15'
+published_at: '2023-12-15:01:00.000-07:00'
+to_depth: 3
+author: angelico_de_los_reyes
+image: lwx-read-replicas/introducing-read-replicas-og.png
+thumb: lwx-read-replicas/read-replicas-thumb.png
+---
+
+Today, we are launching support for Postgres Read Replicas. You can use Read Replicas to:
+
+1. Distribute load across various databases.
+2. Serve data closer to your users.
+3. Provide data redundancy.
+4. Run complex queries without affecting your primary database.
+
+You can create read replicas in any of our 12 supported regions. To start, each project supports up to two replicas.
+
+## What are Read Replicas?
+
+Read replicas continuously, well, _replicate_ data from a primary database. It contains a constantly-updated copy of the data in the Primary.
+
+You can both read and write data on the Primary database. You can _only_ read, on a Read Replica:
+
+| | `select` | `insert` | `update` | `delete` |
+| ------------ | -------- | -------- | -------- | -------- |
+| Primary | ✅ | ✅ | ✅ | ✅ |
+| Read Replica | ✅ | - | - | - |
+
+Replication is asynchronous. It happens in the background so that transactions aren't blocked on the primary. The delay between writing data to the primary and the read replica receiving the change is called _replication lag_.
+
+
+
+
+
+## Why Read Replicas?
+
+To scale your database, you have two choices: horizontal scaling and vertical scaling. Vertical scaling involves adding more RAM and CPU to your existing server. Our 16XL [compute add-on](https://supabase.com/docs/guides/platform/compute-add-ons) has 64 cores CPU and 256 GB RAM - sufficient for almost any well-architected workload.
+
+However, certain workloads may push against the CPU and memory limits of a single server. There’s a limit to how much you can scale vertically. Most cloud providers do not provide instances larger than our 16XL specifications.
+
+This is where horizontal scaling is useful. You can add read replicas to scale more easily. Instead of a single database handling all of your traffic, you can split the traffic across multiple databases.
+
+
+
+Our read replicas will inherit the compute size of its primary. They will eventually scale independently.
+
+
+
+Read replicas are great for reducing the load on your primary database. For instance, you can designate one of your read replicas for analytical tasks. This way, a runaway query in a read replica won't impact the primary.
+
+One of the best features of read replicas is that you can launch them in a different region from your primary. This moves the data closer to your users - querying the nearest read replica for data minimizes overall application latency. We are working on making this easier, stay tuned!
+
+The main drawback of horizontal scaling is complexity. Typically, you need to manage replication lag, handle recovery when a replica fails, and implement some level of application level changes to fully utilize the read replica. In line with our promise to “make Postgres simpler for developers”, we have handled most of that complexity for you:
+
+## Using Read Replicas
+
+You can manage and visualize read replicas from the [infrastructure settings page](https://supabase.com/dashboard/project/_/settings/infrastructure).
+
+
+
+In the SQL editor, you can choose if you want to run the query on the primary or one of the read replicas.
+
+
+
+To make use of your read replicas, copy your connection string for the read replica, update your apps to use the new read replica and you are done! A unique connection pool is also provisioned for each read replica via [Supavisor](https://github.com/supabase/supavisor).
+
+Each replica also has its own associated instance of [PostgREST](https://supabase.com/docs/guides/api), a Data API for [REST](/docs/guides/api) and [GraphQL](/docs/guides/graphql). You can directly access each PostgREST instance, similar to connecting to a specific read replica. Alternatively, we offer a load-balancing endpoint which uses a round-robin strategy to route to each of the PostgREST instances.
+
+## Implementation
+
+Postgres offers various methods to replicate data, each with trade-offs. We use the following native methods:
+
+### Streaming replication
+
+Postgres generates a Write Ahead Log (WAL) as database changes occur. With streaming replication, these changes stream from the primary to the read replica server. The WAL alone is sufficient to reconstruct the database to its current state.
+
+This replication method is fast, since changes are streamed directly from the primary to the read replica. On the other hand, it faces challenges when the read replica can't keep up with the WAL changes from its primary. This can happen when the read replica is too small, running on degraded hardware, or has a heavier workload running.
+
+To address this, Postgres does provide tunable configuration, like `wal_keep_size`, to adjust the WAL retained by the primary. If the read replica fails to “catch up” before the WAL surpasses the `wal_keep_size` setting, the replication is terminated. Tuning is a bit of an art - the amount of WAL required is variable for every situation.
+
+### File-based Log shipping
+
+In this replication method, the primary continuously buffers WAL changes to a local file and then sends the file to the read replica. If multiple read replicas are present, files could also be sent to an intermediary location accessible by all. The read replica then reads the WAL files and applies those changes. There is higher replication lag than streaming replication since the primary buffers the changes locally first. It also means there is a small chance that WAL changes do not reach read replicas if the primary goes down before the file is transferred. In these cases, if the primary fails a replica using streaming replication would (in most cases) be more up-to-date than a replica using file-based log shipping.
+
+### File-Based Log shipping 🤝 Streaming replication
+
+We use a hybrid approach to address the limitations of each method.
+
+
+
+Streaming replication minimizes replication lag, while file-based log shipping provides a fallback. For file-based log shipping, we use our existing Point In Time Recovery (PITR) infrastructure. We regularly archive files from the primary using [WAL-G](https://github.com/wal-g/wal-g), an open source archival and restoration tool, and ship the WAL files to S3.
+
+We combine it with streaming replication to reduce replication lag. Once WAL-G files have been synced from S3, read replicas connect to the primary and stream the WAL directly.
+
+## What's coming
+
+### Automatic Failover
+
+With automatic failovers, a read replica is promoted to be the primary if the primary is unhealthy. This feature is currently only available on our enterprise plan. However, we are planning to extend this to all paid plans. The introduction of self-serve read replicas is a step in that direction.
+
+### Geo-based load balancing
+
+Currently, we have implemented a round-robin strategy of routing PostgREST requests to the different databases. This is useful for sharing the load across the primary and the read replica, but in cases where latency is important, you might want to always route to the closest database instead.
+
+### Supabase Products leveraging Replicas
+
+We are working on support for database-level load balancing through [Supavisor](https://supabase.com/blog/supavisor-postgres-connection-pooler). When routing database traffic through Supavisor, it routes write queries to the primary and splits read queries between the primary and read replica. This distributes load to all your databases without any changes to your application. Other Supabase products like Auth, Storage, and Realtime use the database heavily. We are working on adding read replica support to these products, so that they can leverage the read replica when appropriate. This means they won’t just query the primary but will also use the read replica’s compute when possible.
+
+## Pricing and Availability
+
+Read replicas are priced like regular databases for compute and storage. There is also a per-GB cost for WAL transfer between the primary and read replica. The total price is the sum of:
+
+- The compute instance of the read replica. The compute hours used by your read replica will be added to the total compute hours used by your organization and charged at the same rate.
+- The disk size of the read replica will be charged at the same rate of 0.125$ / GB
+- Any WAL transfer between the primary and read replica will be charged at 9c / GB
+
+[Sign-ups](https://forms.supabase.com/read-replica) for early access of self-serve Read Replica support are now open. Following which we will progressively rollout self-serve Read Replica support to all paid plans over the next few months.
diff --git a/apps/www/components/Hero/Hero.tsx b/apps/www/components/Hero/Hero.tsx
index 60c89e70980..c6cc18df10b 100644
--- a/apps/www/components/Hero/Hero.tsx
+++ b/apps/www/components/Hero/Hero.tsx
@@ -7,7 +7,6 @@ import { Button, IconBookOpen } from 'ui'
import SectionContainer from '~/components/Layouts/SectionContainer'
import HeroFrameworks from './HeroFrameworks'
import styles from './hero.module.css'
-import Image from 'next/image'
import AnnouncementBadge from '../Announcement/Badge'
const Hero = () => {
@@ -32,8 +31,8 @@ const Hero = () => {
diff --git a/apps/www/components/LaunchWeek/X/Album/Player.tsx b/apps/www/components/LaunchWeek/X/Album/Player.tsx
index ea47e58b411..9cc48dfe325 100644
--- a/apps/www/components/LaunchWeek/X/Album/Player.tsx
+++ b/apps/www/components/LaunchWeek/X/Album/Player.tsx
@@ -4,7 +4,7 @@ import { IconArrowRight, cn } from 'ui'
const Player = () => {
const [audio, state, controls, ref] = useAudio({
- src: 'https://obuldanrptloktxcffvn.supabase.co/storage/v1/object/public/audio/supabase-album/Starbuck.m4a',
+ src: 'https://obuldanrptloktxcffvn.supabase.co/storage/v1/object/public/audio/supabase-album/Bernard.m4a',
loop: true,
})
diff --git a/apps/www/components/LaunchWeek/X/LWXSummary.tsx b/apps/www/components/LaunchWeek/X/LWXSummary.tsx
index 1881cc1c0d0..7835daec0de 100644
--- a/apps/www/components/LaunchWeek/X/LWXSummary.tsx
+++ b/apps/www/components/LaunchWeek/X/LWXSummary.tsx
@@ -32,13 +32,11 @@ const LWXSummary = () => {
(day, i: number) =>
day.shipped && (
-
-
- Day {i + 1} - {day.description}
+
+
+ Day {i + 1} -
+ {day.description}
)
diff --git a/apps/www/components/LaunchWeek/X/Releases/data/lwx_data.tsx b/apps/www/components/LaunchWeek/X/Releases/data/lwx_data.tsx
index 8ec6f65e2f0..cd6e4776da5 100644
--- a/apps/www/components/LaunchWeek/X/Releases/data/lwx_data.tsx
+++ b/apps/www/components/LaunchWeek/X/Releases/data/lwx_data.tsx
@@ -193,7 +193,6 @@ const days: WeekDayProps[] = [
dd: 'Thu',
title: '',
shipped: true,
- isToday: true,
hasCountdown: false,
blog: '/blog/supabase-auth-identity-linking-hooks',
date: '14 Dec',
@@ -201,7 +200,7 @@ const days: WeekDayProps[] = [
description: (
<>
Supabase Auth: Identity Linking, Session Control,{' '}
- Passwords and Hooks
+ Password Protection and Hooks
>
),
links: [
@@ -237,19 +236,44 @@ const days: WeekDayProps[] = [
d: 5,
dd: 'Fri',
title: '',
- shipped: false,
- hasCountdown: true,
- blog: '',
+ shipped: true,
+ isToday: true,
+ hasCountdown: false,
+ blog: '/blog/introducing-read-replicas',
date: '15 Dec',
published_at: '2023-12-15T08:00:00.000-08:00',
- description: '',
+ description: (
+ <>
+ Introducing Read Replicas for low latency
+ >
+ ),
links: [
+ {
+ type: 'blog',
+ href: '/blog/introducing-read-replicas',
+ },
+ {
+ type: 'video',
+ href: 'PX3R1fXjJ2M',
+ },
{
type: 'xSpace',
href: 'https://twitter.com/i/spaces/1vAxRvjmvRgxl',
},
],
- steps: [],
+ steps: [
+ {
+ title: '',
+ blog: '/blog/introducing-read-replicas',
+ bg_layers: [
+ {
+ img: '/images/launchweek/lwx/day5/d5_read_replicas.svg',
+ mobileImg: '/images/launchweek/lwx/day5/d5_read_replicas_mobile.svg',
+ },
+ ],
+ steps: [],
+ },
+ ],
},
]
diff --git a/apps/www/public/images/blog/lwx-read-replicas/introducing-read-replicas-og.png b/apps/www/public/images/blog/lwx-read-replicas/introducing-read-replicas-og.png
new file mode 100644
index 00000000000..996886975df
Binary files /dev/null and b/apps/www/public/images/blog/lwx-read-replicas/introducing-read-replicas-og.png differ
diff --git a/apps/www/public/images/blog/lwx-read-replicas/read-replicas-02.png b/apps/www/public/images/blog/lwx-read-replicas/read-replicas-02.png
new file mode 100644
index 00000000000..afa1b17f1d7
Binary files /dev/null and b/apps/www/public/images/blog/lwx-read-replicas/read-replicas-02.png differ
diff --git a/apps/www/public/images/blog/lwx-read-replicas/read-replicas-thumb.png b/apps/www/public/images/blog/lwx-read-replicas/read-replicas-thumb.png
new file mode 100644
index 00000000000..e42ba512a0b
Binary files /dev/null and b/apps/www/public/images/blog/lwx-read-replicas/read-replicas-thumb.png differ
diff --git a/apps/www/public/images/blog/lwx-read-replicas/read-replicas.png b/apps/www/public/images/blog/lwx-read-replicas/read-replicas.png
new file mode 100644
index 00000000000..09e3efc24f2
Binary files /dev/null and b/apps/www/public/images/blog/lwx-read-replicas/read-replicas.png differ
diff --git a/apps/www/public/images/blog/lwx-read-replicas/streaming-replication-dark.png b/apps/www/public/images/blog/lwx-read-replicas/streaming-replication-dark.png
new file mode 100644
index 00000000000..d596e61e30f
Binary files /dev/null and b/apps/www/public/images/blog/lwx-read-replicas/streaming-replication-dark.png differ
diff --git a/apps/www/public/images/blog/lwx-read-replicas/streaming-replication-light.png b/apps/www/public/images/blog/lwx-read-replicas/streaming-replication-light.png
new file mode 100644
index 00000000000..9a6ff9e08bc
Binary files /dev/null and b/apps/www/public/images/blog/lwx-read-replicas/streaming-replication-light.png differ
diff --git a/apps/www/public/images/launchweek/lwx/day5/d5_read_replicas.svg b/apps/www/public/images/launchweek/lwx/day5/d5_read_replicas.svg
new file mode 100644
index 00000000000..ed3908aa616
--- /dev/null
+++ b/apps/www/public/images/launchweek/lwx/day5/d5_read_replicas.svg
@@ -0,0 +1,81 @@
+
diff --git a/apps/www/public/images/launchweek/lwx/day5/d5_read_replicas_mobile.svg b/apps/www/public/images/launchweek/lwx/day5/d5_read_replicas_mobile.svg
new file mode 100644
index 00000000000..8f1a40f1770
--- /dev/null
+++ b/apps/www/public/images/launchweek/lwx/day5/d5_read_replicas_mobile.svg
@@ -0,0 +1,81 @@
+
diff --git a/apps/www/public/rss.xml b/apps/www/public/rss.xml
index 7e7e995b956..e37b78effab 100644
--- a/apps/www/public/rss.xml
+++ b/apps/www/public/rss.xml
@@ -5,9 +5,30 @@
https://supabase.com
Latest news from Supabaseen
- Wed, 13 Dec 2023 23:00:00 GMT
+ Thu, 14 Dec 2023 23:00:00 GMT
+ https://supabase.com/blog/introducing-read-replicas
+ Introducing Read Replicas
+ https://supabase.com/blog/introducing-read-replicas
+ We are launching support for database Read Replicas
+ Thu, 14 Dec 2023 23:00:00 GMT
+
+
+ https://supabase.com/blog/client-libraries-v2
+ Supabase Libraries V2: Python, Swift, Kotlin, Flutter, and Typescript
+ https://supabase.com/blog/client-libraries-v2
+ Swift, Kotlin, C#, and Python are now stable and moving to the v2 API.
+ Thu, 14 Dec 2023 23:00:00 GMT
+
+
+ https://supabase.com/blog/postgres-on-fly-by-supabase
+ Fly Postgres, managed by Supabase
+ https://supabase.com/blog/postgres-on-fly-by-supabase
+ A managed Postgres offering developed by Supabase and Fly.io
+ Thu, 14 Dec 2023 23:00:00 GMT
+
+https://supabase.com/blog/supabase-auth-identity-linking-hooksSupabase Auth: Identity Linking, Hooks, and HaveIBeenPwned integration
https://supabase.com/blog/supabase-auth-identity-linking-hooks
diff --git a/packages/ui/src/components/PromoToast/PromoToast.tsx b/packages/ui/src/components/PromoToast/PromoToast.tsx
index 646c9ea99c0..ad85d72b2d7 100644
--- a/packages/ui/src/components/PromoToast/PromoToast.tsx
+++ b/packages/ui/src/components/PromoToast/PromoToast.tsx
@@ -3,8 +3,6 @@ import Link from 'next/link'
import { useEffect, useState } from 'react'
import { Button, cn } from 'ui'
import { LOCAL_STORAGE_KEYS } from 'common'
-import announcement from '../../layout/banners/data/Announcement.json'
-import CountdownComponent from '../CountdownWidget/Countdown'
import PromoBg from './PromoBg'
const LWXLogo =
@@ -44,12 +42,12 @@ const PromoToast = () => {
Launch Week
- Day 4: Supabase Auth Day
+ Day 5: introducing Read Replicas