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. + + How replication is achieved. +
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 + +
+ Map view of all project databases + + Map view of all project databases. + +
+ +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 + +
+ SQL editor view. + + SQL editor view. + +
+ +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_. + +
+