Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Realtime limits doc with sidebar

Chase Granberryded269ef6b53
diff --git a/apps/reference/docs/guides/realtime/limits.mdx b/apps/reference/docs/guides/realtime/limits.mdx
new file mode 100644
index 00000000000..5941dff2984
--- /dev/null
+++ b/apps/reference/docs/guides/realtime/limits.mdx
@@ -0,0 +1,66 @@
+---
+id: limits
+title: Realtime Limits
+description: Realtime Rate Limiting
+---
+
+Since deploying a global multi-tenant cluster for Supabase Realtime, we've implimented some rate limits to protect our infrastructure.
+
+Rate limits are mostly configurable per project and our cluster can support millions of concurrent connections if needed. If you're running into any rate limiting and it's causing issues, please [contact support](https://app.supabase.com/support/new).
+
+## Limits by Plan
+
+Limits are set on the Free and Pro plans accordingly. See our [pricing page](https://supabase.com/pricing) for more information.
+
+Above the Pro plan Realtime is billed on a usage basis. We still employ limiting above the Pro plan to protect our infrastructure. If you're on an Enterprise plan simply contact support and we'll increase your limits as needed.
+
+Enterprise plan limits start at:
+
+- 500 concurrent users
+- 1,000 messages per second
+- 500 concurrent Channels
+
+## System Limits
+
+Some limits apply to all projects and are not currently configurable per project.
+
+- 500 Channel joins per second
+- 100 Channels per connected user
+
+## Client-side Limiting
+
+Some basic WebSocket message rate limiting has been implimented client-side.
+
+See the [Cursor Positions Quickstart](/docs/guides/realtime/quickstart#cursor-positions) section where a `eventsPerSecond` parameter is passed in when instantiating the Supabase client.
+
+- Default: `10` events per second
+
+## Rate Limiting Errors
+
+Errors could be generated in two places: the backend logs, a message in WebSocket.
+
+:::note
+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 hitting any rate limits check your Realtime logs. Realtime logs can be accessed at `https://app.supabase.com/project/REFERENCE_ID/database/realtime-logs`.
+
+### WebSocket Errors
+
+- `tenant_events`: In the event your project is generating too many messages per second clients will be disconnected. `supabase-js` will attempt to reconnect automatically. It should reconnect successfully if the rate limit decreases appropriately.
+
+Some limits will cause a Channel join to be refused. In this case a reply in the WebSocket will be one of:
+
+- `too_many_channels`: Too many channels currently joined for a single user.
+- `too_many_connections`: Too many total concurrent connections for a project.
+- `too_many_joins`: Too many Channel joins per second.
+
+:::note
+Use Chroms DevTools to find the WebSocket initiation request and view individual messages.
+:::
+
+## Payload Limits
+
+Realtime has a PubSub message payload size limit of 1 megabyte.
diff --git a/apps/reference/nav/_referenceSidebars.js b/apps/reference/nav/_referenceSidebars.js
index f88427304a1..549730d1d4e 100644
--- a/apps/reference/nav/_referenceSidebars.js
+++ b/apps/reference/nav/_referenceSidebars.js
@@ -173,7 +173,13 @@ const sidebars = {
'guides/realtime',
'guides/realtime/quickstart',
'guides/realtime/postgres-cdc',
- ],
+ {
+ type: 'doc',
+ id: 'guides/realtime/limits', // document ID
+ label: 'Limits', // sidebar label
+ }
+
+ ]
},
{
type: 'category',