The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
feat(pipelines): Add clarification on region (#47641)
Riccardo Busetti34d641f50be7
diff --git a/apps/docs/content/guides/database/replication/pipelines-faq.mdx b/apps/docs/content/guides/database/replication/pipelines-faq.mdxindex 2b1ee6b92e8..f8268695983 100644--- a/apps/docs/content/guides/database/replication/pipelines-faq.mdx+++ b/apps/docs/content/guides/database/replication/pipelines-faq.mdx@@ -18,6 +18,14 @@ Pipelines currently supports **BigQuery** as the managed destination. See the [BWe are working on new destinations. Supported destinations can be Supabase-managed or third-party systems as support expands. Availability may continue to vary based on the planned roll-out strategy.+## Does the destination's region affect performance?++Yes. The further apart your source database, the pipeline, and your destination are, the more network latency is added to replication, which increases replication lag and reduces throughput.++Pipelines run out of **eu-central-1 (Frankfurt)**. For the best performance, place both your source project and your destination as close to this region as possible.++If you can only optimize one side, prioritize placing your **destination** close to the pipeline's region. Replicated data continuously streams out to the destination, so latency on that leg has a bigger impact on overall replication lag than latency between the pipeline and the source.+{/* supa-mdx-lint-disable-next-line Rule001HeadingCase */}## Which plans support Pipelines?diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/PublicationsComboBox.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/PublicationsComboBox.tsxindex 4a9cc645b66..2e6e8f70144 100644--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/PublicationsComboBox.tsx+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/PublicationsComboBox.tsx@@ -18,6 +18,7 @@ import {PopoverTrigger,ScrollArea,} from 'ui'+import { GenericSkeletonLoader } from 'ui-patterns/ShimmeringLoader'import type { DestinationPanelSchemaType } from './DestinationForm.schema'import { useReplicationPublicationsQuery } from '@/data/replication/publications-query'@@ -83,13 +84,7 @@ export const PublicationsComboBox = ({'w-full [&>span]:w-full text-left',!selectedPublication && 'text-foreground-muted')}- iconRight={- showLoadingState ? (- <Loader2 className="text-foreground-muted animate-spin" strokeWidth={2} size={14} />- ) : (- <ChevronsUpDown className="text-foreground-muted" strokeWidth={2} size={14} />- )- }+ iconRight={showLoadingState ? <Loader2 className="animate-spin" /> : <ChevronsUpDown />}name={field.name}onBlur={field.onBlur}>@@ -105,16 +100,13 @@ export const PublicationsComboBox = ({onValueChange={setSearchTerm}/><CommandList>- <CommandEmpty>- {showLoadingState ? (- <div className="flex items-center gap-2 text-center justify-center">- <Loader2 size={12} className="animate-spin" />- Loading...- </div>- ) : (- 'No publications found'- )}- </CommandEmpty>+ <CommandEmpty>No publications found</CommandEmpty>++ {showLoadingState && (+ <div className="flex items-center gap-2 p-2 pb-0 text-center justify-center">+ <GenericSkeletonLoader className="w-full" />+ </div>+ )}<CommandGroup>{publications.length === 0 && !showLoadingState && (diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/index.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/index.tsxindex e1e376e0350..6e5cfdefa76 100644--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/index.tsx+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/index.tsx@@ -5,7 +5,20 @@ import { AnimatePresence, motion } from 'framer-motion'import { Loader2 } from 'lucide-react'import { useEffect, useMemo, useRef, useState } from 'react'import { useForm } from 'react-hook-form'-import { Button, DialogSectionSeparator, Form, SheetFooter, SheetSection } from 'ui'+import { AWS_REGIONS } from 'shared-data'+import {+ Button,+ DialogSectionSeparator,+ Form,+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue,+ SheetFooter,+ SheetSection,+} from 'ui'+import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'import * as z from 'zod'import {@@ -41,9 +54,14 @@ import { useReplicationPipelineByIdQuery } from '@/data/replication/pipeline-by-import { useReplicationPublicationsQuery } from '@/data/replication/publications-query'import { useReplicationSourcesQuery } from '@/data/replication/sources-query'import { useAsyncCheckPermissions } from '@/hooks/misc/useCheckPermissions'+import { BASE_PATH, IS_STAGING_OR_LOCAL } from '@/lib/constants'const formId = 'destination-editor'+// Pipelines always run out of a single fixed region per environment, regardless of the source+// project's region.+const PIPELINE_REGION = IS_STAGING_OR_LOCAL ? AWS_REGIONS.SOUTHEAST_ASIA : AWS_REGIONS.CENTRAL_EU+interface DestinationFormProps {selectedType: DestinationTypevisible: boolean@@ -314,7 +332,7 @@ export const DestinationForm = ({<div className="p-5 flex flex-col gap-y-6"><p className="text-sm font-medium text-foreground">Destination details</p>- <div className="space-y-4">+ <div className="flex flex-col gap-y-4"><DestinationNameInput form={form} /><PublicationSelectionform={form}@@ -322,6 +340,36 @@ export const DestinationForm = ({visible={visible}onSelectNewPublication={() => setPublicationPanelVisible(true)}/>+ <FormItemLayout+ isReactForm={false}+ layout="horizontal"+ className="[&>div>p]:text-foreground-lighter"+ label="Region"+ description="Pipelines run in a fixed region and cannot be changed."+ >+ <Select disabled value={PIPELINE_REGION.code}>+ <SelectTrigger>+ <SelectValue placeholder="Select a region" />+ </SelectTrigger>+ <SelectContent>+ <SelectItem value={PIPELINE_REGION.code}>+ <div className="flex gap-x-3 items-center">+ <img+ alt="region icon"+ className="w-5 rounded-xs"+ src={`${BASE_PATH}/img/regions/${PIPELINE_REGION.code}.svg`}+ />+ <p className="flex items-center gap-x-2">+ <span>{PIPELINE_REGION.displayName}</span>+ <span className="text-xs text-foreground-lighter font-mono">+ {PIPELINE_REGION.code}+ </span>+ </p>+ </div>+ </SelectItem>+ </SelectContent>+ </Select>+ </FormItemLayout></div></div>