From 660cc3cf7f510e46b6bc448ae46cfb3255a9af3e Mon Sep 17 00:00:00 2001 From: Copple <10214025+kiwicopple@users.noreply.github.com> Date: Tue, 12 Sep 2023 09:16:17 -0700 Subject: [PATCH] clean up deep dive --- .../NavigationMenu.constants.ts | 12 ++--- apps/docs/pages/guides/realtime/quotas.mdx | 52 ++++++++----------- 2 files changed, 29 insertions(+), 35 deletions(-) diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts index 9cf59275895..7ed98e74b22 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts @@ -894,11 +894,6 @@ export const realtime: NavMenuConstant = { name: 'Subscribing to Database Changes', url: '/guides/realtime/subscribing-to-database-changes', }, - { - name: 'Bring Your Own Database', - url: '/guides/realtime/bring-your-own-database', - items: [], - }, { name: 'Using Realtime with Next.js', url: '/guides/realtime/realtime-with-nextjs', @@ -911,7 +906,12 @@ export const realtime: NavMenuConstant = { items: [ { name: 'Quotas', url: '/guides/realtime/quotas' }, { name: 'Architecture', url: '/guides/realtime/architecture' }, - { name: 'Protocol', url: '/guides/realtime/protocol' }, + { name: 'Message Protocol', url: '/guides/realtime/protocol' }, + { + name: 'Bring Your Own Database', + url: '/guides/realtime/bring-your-own-database', + items: [], + }, ], }, ], diff --git a/apps/docs/pages/guides/realtime/quotas.mdx b/apps/docs/pages/guides/realtime/quotas.mdx index 8f9ec1e6121..c26e1ad65cf 100644 --- a/apps/docs/pages/guides/realtime/quotas.mdx +++ b/apps/docs/pages/guides/realtime/quotas.mdx @@ -7,9 +7,11 @@ export const meta = { sidebar_label: 'Quotas', } +Our cluster supports millions of concurrent connections and message throughput for production workloads. + -Upgrade your plan to increase your quotas. Without a spend cap, or on an Enterprise plan, some quotas are still in place to protect budgets. All quotas are configurable per project. [Contact support](https://supabase.com/dashboard/support/new) if you need your quotas increased. Our cluster supports millions of concurrent connections and message throughput for production workloads. +Upgrade your plan to increase your quotas. Without a spend cap, or on an Enterprise plan, some quotas are still in place to protect budgets. All quotas are configurable per project. [Contact support](https://supabase.com/dashboard/support/new) if you need your quotas increased. @@ -28,47 +30,39 @@ Upgrade your plan to increase your quotas. Without a spend cap, or on an Enterpr Beyond the Free and Pro plan you can customize your quotas by [contacting support](https://supabase.com/dashboard/support/new). -## Client-Side Limiting +## Client-Side throttling -Some basic WebSocket message rate limiting is implemented client-side. - -For example, the [multiplayer.dev](https://multiplayer.dev) instantiates the Supabase client with an `eventsPerSecond` parameter. +Some basic WebSocket message throttling is implemented client-side. See the [Throttling](/docs/guides/realtime/guides/client-side-throttling) guide for more details. ## Quota Errors -When you reach a quota errors can appear in backend logs and messages in the WebSocket connection. +When you exceed a quota, errors will appear in the backend logs and client-side messages in the WebSocket connection. - +- **Logs**: check the [Realtime logs](https://supabase.com/dashboard/project/_/database/realtime-logs) inside your project Dashboard. +- **Websocket errors**: Use your browser's developer tools to find the WebSocket initiation request and view individual messages. -Use the [Realtime Inspector](https://realtime.supabase.com/inspector/new) to reproduce an error and share those connection details with Supabase support. + + +You can use the [Realtime Inspector](https://realtime.supabase.com/inspector/new) to reproduce an error and share those connection details with Supabase support. - -### Backend Logs - -If your project is being limited by a quota, check your [Realtime logs](https://supabase.com/dashboard/project/_/database/realtime-logs). - -### WebSocket Errors - -- `tenant_events`: Clients will be disconnected if your project is generating too many messages per second. `supabase-js` should reconnect automatically when the message throughput decreases below your plan quota. - - - -An `event` is a WebSocket message delivered to, or sent from a client. - - - Some quotas can cause a Channel join to be refused. Realtime will reply with one of the following WebSocket messages: -- `too_many_channels`: Too many channels currently joined for a single client. -- `too_many_connections`: Too many total concurrent connections for a project. -- `too_many_joins`: Too many Channel joins per second. +### `too_many_channels` - +Too many channels currently joined for a single client. -Use your browser's developer tools to find the WebSocket initiation request and view individual messages. +### `too_many_connections` - +Too many total concurrent connections for a project. + +### `too_many_joins` + +Too many Channel joins per second. + +### `tenant_events` + +Clients will be disconnected if your project is generating too many messages per second. `supabase-js` will reconnect automatically when the message throughput decreases below your plan quota. An `event` is a WebSocket message delivered to, or sent from a client. ## Postgres Changes Payload Quota