Limits and Quotas
Reference for all limits applied to Realtime Messaging usage. Plan-specific values are published on the pricing page; the values below apply uniformly across plan tiers unless otherwise noted.
Summary
| Limit | Value |
|---|---|
| Maximum inbound WebSocket frame | 64 KB per frame |
| Maximum channels per connection | 100 |
Maximum peerMetadata serialized size | 4 KB |
Maximum metadata serialized size | 8 KB |
Maximum peerId length | 128 bytes, printable ASCII |
| Maximum channel name length | 256 bytes |
Maximum requestId length | 128 bytes |
| Maximum signalling API keys per app | 50 |
| Per-connection sustained message rate | 100 messages/sec (200 burst) |
| Per-source-IP connection rate | 60 attempts per 60 seconds |
Plan Limits
Two metered dimensions, each capped per plan:
- Concurrent connections — peak simultaneous WebSocket connections per app
- Messages per billing period — total
publishandsendcalls accumulated within the billing window
Plan-tier values and overage rates are published at metered.ca/pricing.
Behavior on Plan Exhaustion
| Condition | New connection request | publish / send request |
|---|---|---|
| Within plan | Allowed | Allowed |
| Over plan, overages disabled | Rejected with close code 4010 | Soft drop: error with code: "over_message_quota"; connection remains open |
| Over plan, overages enabled, balance sufficient | Allowed; billed at overage rate | Allowed; billed at overage rate |
| Over plan, overages enabled, balance exhausted, auto-recharge disabled | Rejected with close code 4010 | Soft drop: error with code: "over_message_quota" |
| Over plan, overages enabled, balance exhausted, auto-recharge enabled | Auto-recharge attempted; on success, allowed | Auto-recharge attempted; on success, allowed |
The free plan applies hard caps on both dimensions and does not support overages.
Inbound delivery (message, direct, presence) is not affected by quota exhaustion. Only outbound publish and send requests are blocked.
Usage Reporting
| Source | Latency |
|---|---|
| Dashboard → Realtime Messaging → Usage | Reflects usage within approximately 60 seconds |
GET /v1/usage REST endpoint | Same source; programmatic access |
Operational Rate Limits
The following limits are not billing-related and are not visible on usage dashboards.
Per-Connection Message Rate
| Value | |
|---|---|
| Sustained rate | 100 messages/sec |
| Burst capacity | 200 messages |
| Charged on | each publish or send |
| Behavior on exhaustion | Hard close with code 4011. Reconnect resets the counter. |
Higher sustained rates are available on enterprise plans. Contact sales for required throughput.
Per-Source-IP Connection Rate
| Value | |
|---|---|
| Attempts allowed | 60 per 60-second window |
| Behavior on exhaustion | HTTP 429 at the upgrade response (no WebSocket handshake) |
Protocol-Level Limits
Server-enforced. Apply uniformly to every plan tier.
| Limit | Value | Behavior on hit |
|---|---|---|
| Maximum inbound WebSocket frame | 64 KB | Close code 1009 |
| Maximum channels per single connection | 100 | error with code: "channel_limit_exceeded" |
Maximum peerId length | 128 bytes, printable ASCII | JWT rejected at verify (close code 4001) |
| Maximum channel name length | 256 bytes | error with code: "invalid_channel" |
Maximum requestId length | 128 bytes | error with code: "malformed_message" |
Maximum peerMetadata serialized size | 4 KB | JWT rejected at verify (close code 4001) |
Maximum metadata serialized size | 8 KB | Enforced by the REST POST /v1/tokens mint endpoint. Customers minting JWTs directly with their sk_ are responsible for observing this limit. |
| Maximum signalling API keys per app | 50 | Dashboard key creation rejected |
metadata vs peerMetadata
The two claims have different delivery semantics, which is reflected in their distinct size limits:
metadatais delivered to the connecting peer in the welcome message. Single delivery per connection.peerMetadatais included on every presence event and, when enabled, on every broadcast message. Egress scales with channel activity.
Channel Name Constraints
| Constraint | Value |
|---|---|
| Length | Non-empty, ≤256 bytes |
| Character set | Printable ASCII |
| Reserved prefixes | _metered/, _internal/, _system/ |
Recommended naming convention: app_<appId>/<namespace>/<topic>. Channels are scoped per app; identical channel names across two apps do not interact.
Non-Counted Operations
The following do not count against the per-period message quota:
subscribeandunsubscribe- Server-emitted messages (
welcome,presence,going_away) - REST API read operations (
GET /v1/usage,GET /v1/channels/{id}/peers)
REST API read operations are subject to a separate per-key rate limit. Contact sales for high-frequency programmatic read requirements.