Skip to main content

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

LimitValue
Maximum inbound WebSocket frame64 KB per frame
Maximum channels per connection100
Maximum peerMetadata serialized size4 KB
Maximum metadata serialized size8 KB
Maximum peerId length128 bytes, printable ASCII
Maximum channel name length256 bytes
Maximum requestId length128 bytes
Maximum signalling API keys per app50
Per-connection sustained message rate100 messages/sec (200 burst)
Per-source-IP connection rate60 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 publish and send calls accumulated within the billing window

Plan-tier values and overage rates are published at metered.ca/pricing.

Behavior on Plan Exhaustion

ConditionNew connection requestpublish / send request
Within planAllowedAllowed
Over plan, overages disabledRejected with close code 4010Soft drop: error with code: "over_message_quota"; connection remains open
Over plan, overages enabled, balance sufficientAllowed; billed at overage rateAllowed; billed at overage rate
Over plan, overages enabled, balance exhausted, auto-recharge disabledRejected with close code 4010Soft drop: error with code: "over_message_quota"
Over plan, overages enabled, balance exhausted, auto-recharge enabledAuto-recharge attempted; on success, allowedAuto-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

SourceLatency
Dashboard → Realtime Messaging → UsageReflects usage within approximately 60 seconds
GET /v1/usage REST endpointSame 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 rate100 messages/sec
Burst capacity200 messages
Charged oneach publish or send
Behavior on exhaustionHard 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 allowed60 per 60-second window
Behavior on exhaustionHTTP 429 at the upgrade response (no WebSocket handshake)

Protocol-Level Limits

Server-enforced. Apply uniformly to every plan tier.

LimitValueBehavior on hit
Maximum inbound WebSocket frame64 KBClose code 1009
Maximum channels per single connection100error with code: "channel_limit_exceeded"
Maximum peerId length128 bytes, printable ASCIIJWT rejected at verify (close code 4001)
Maximum channel name length256 byteserror with code: "invalid_channel"
Maximum requestId length128 byteserror with code: "malformed_message"
Maximum peerMetadata serialized size4 KBJWT rejected at verify (close code 4001)
Maximum metadata serialized size8 KBEnforced 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 app50Dashboard key creation rejected

metadata vs peerMetadata

The two claims have different delivery semantics, which is reflected in their distinct size limits:

  • metadata is delivered to the connecting peer in the welcome message. Single delivery per connection.
  • peerMetadata is included on every presence event and, when enabled, on every broadcast message. Egress scales with channel activity.

Channel Name Constraints

ConstraintValue
LengthNon-empty, ≤256 bytes
Character setPrintable 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:

  • subscribe and unsubscribe
  • 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.

See Also