mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00:00
Adds internal cross-links to docs guides ## Testing - Prettier passes on the changed lines. - Docs build passes (`pnpm build --filter=docs`). - Docs link e2e run locally against the production build for every changed page across this PR. --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
107 lines
4.8 KiB
Plaintext
107 lines
4.8 KiB
Plaintext
---
|
|
id: 'manage-usage-realtime-peak-connections'
|
|
title: 'Manage Realtime Peak Connections usage'
|
|
---
|
|
|
|
## What you are charged for
|
|
|
|
Realtime Peak Connections are measured by tracking the highest number of concurrent connections for each project during the billing cycle. Regardless of fluctuations, only the peak count per project is used for billing, and the totals from all projects are summed. Only successful connections are counted, connection attempts are not included.
|
|
|
|
Every WebSocket connection to Realtime counts, including connections from your own servers. In [Edge Functions](/docs/guides/functions) and other serverless runtimes, each worker that subscribes to a channel opens its own connection, so peak connections can far exceed your number of users. To send messages from a server without opening a connection, use the [Broadcast REST API](/docs/guides/realtime/broadcast#broadcast-using-the-rest-api).
|
|
|
|
### Example
|
|
|
|
For simplicity, this example assumes a billing cycle of only three days.
|
|
|
|
| Project | Peak Connections Day 1 | Peak Connections Day 2 | Peak Connections Day 3 |
|
|
| --------- | ---------------------- | ---------------------- | ---------------------- |
|
|
| Project A | 80 | 100 | 90 |
|
|
| Project B | 120 | 110 | 150 |
|
|
|
|
**Total billed connections:** 100 (Project A) + 150 (Project B) = **250 connections**
|
|
|
|
## How charges are calculated
|
|
|
|
Realtime Peak Connections are billed using Package pricing, with each package representing 1,000 peak connections. If your usage falls between two packages, you are billed for the next whole package.
|
|
|
|
### Example [#how-charges-are-calculated-example]
|
|
|
|
For simplicity, assume a package size of 1,000 and a charge of <Price price="10" /> per package with no quota.
|
|
|
|
| Peak Connections | Packages Billed | Costs |
|
|
| ---------------- | --------------- | -------------------- |
|
|
| 999 | 1 | <Price price="10" /> |
|
|
| 1,000 | 1 | <Price price="10" /> |
|
|
| 1,001 | 2 | <Price price="20" /> |
|
|
| 1,500 | 2 | <Price price="20" /> |
|
|
|
|
### Usage on your invoice
|
|
|
|
Usage is shown as "Realtime Peak Connections" on your invoice.
|
|
|
|
## Pricing
|
|
|
|
<$Partial path="billing/pricing/pricing_realtime_connections.mdx" />
|
|
|
|
## Billing examples
|
|
|
|
### Within quota
|
|
|
|
The organization's connections are within the quota, so no charges apply.
|
|
|
|
| Line Item | Units | Costs |
|
|
| ------------------------- | --------------- | ------------------------ |
|
|
| Pro Plan | 1 | <Price price="25" /> |
|
|
| Compute Hours Small | 730 hours | <Price price="15" /> |
|
|
| Realtime Peak Connections | 350 connections | <Price price="0" /> |
|
|
| **Subtotal** | | **<Price price="40" />** |
|
|
| Compute Credits | | -<Price price="10" /> |
|
|
| **Total** | | **<Price price="30" />** |
|
|
|
|
### Exceeding quota
|
|
|
|
The organization's connections exceed the quota by 1,200, incurring charges for this additional usage.
|
|
|
|
| Line Item | Units | Costs |
|
|
| ------------------------- | ----------------- | ------------------------ |
|
|
| Pro Plan | 1 | <Price price="25" /> |
|
|
| Compute Hours Small | 730 hours | <Price price="15" /> |
|
|
| Realtime Peak Connections | 1,700 connections | <Price price="20" /> |
|
|
| **Subtotal** | | **<Price price="60" />** |
|
|
| Compute Credits | | -<Price price="10" /> |
|
|
| **Total** | | **<Price price="50" />** |
|
|
|
|
## View usage
|
|
|
|
You can view Realtime Peak Connections usage on the [organization's usage page](/dashboard/org/_/usage). The page shows the usage of all projects by default. To view the usage for a specific project, select it from the dropdown. You can also select a different time period.
|
|
|
|
<Image
|
|
alt="Usage page navigation bar"
|
|
src={{
|
|
light: '/docs/img/guides/platform/usage-navbar--light.png',
|
|
dark: '/docs/img/guides/platform/usage-navbar--dark.png',
|
|
}}
|
|
|
|
width={1546}
|
|
height={208}
|
|
/>
|
|
|
|
In the Realtime Peak Connections section, you can see the usage for the selected time period.
|
|
|
|
<Image
|
|
alt="Usage page Realtime Peak Connections section"
|
|
src={{
|
|
light: '/docs/img/guides/platform/usage-realtime-peak-connections--light.png',
|
|
dark: '/docs/img/guides/platform/usage-realtime-peak-connections--dark.png',
|
|
}}
|
|
|
|
width={2046}
|
|
height={752}
|
|
/>
|
|
|
|
## Exceeding Quotas
|
|
|
|
<$Partial path="billing/exceeding_usage_quotas.mdx" />
|
|
|
|
If you hit the concurrent peak connections quota, see [Realtime concurrent peak connections quota](/kb/troubleshooting/realtime-concurrent-peak-connections-quota-jdDqcp).
|