Limits
Know where
the edges are.
This page lists the limits of each plan, the fixed limits that all plans share, how Celeris counts messages, and the results when you reach a limit.
Plan limits
These values come directly from our plan configuration. Limits apply to your full account, across all of its applications, unless a row says differently. When you change plans, open connections get the new limits in approximately two minutes.
Limits on every plan
These limits are the same on every plan. The SDKs apply most of these limits before data reaches Celeris.
| Limit | Value |
|---|---|
| Encoded command size | 2 MiB. This includes the framing, the identifiers, and the payload. The SDK refuses larger commands and does not send them. |
| SDK writer | 64 pending commands and 2 MiB of buffered data. A maximum of 64 more publishes wait for space by default. You can configure this queue size. |
| Channel references | 1 to 255 ASCII letters, digits, hyphens or underscores. |
| Presence list pages | 1 to 100 entries per page, one active query per channel, and a 10-second timeout. |
| Replay after a reconnect | A maximum of the last 100 messages from the past 2 minutes per segment, and only when your credentials allow replay. |
| Duplicate filtering | The SDK remembers the last 1,024 message IDs per channel. |
| Connect deadline | 15 seconds for credentials and handshake together. |
| Automatic reconnection | 10 failed attempts by default (configurable), with random delays of up to 30 seconds. |
How Celeris counts messages
Celeris counts messages at each WebSocket connection. Each command that a client sends to Celeris is one message. Each message that Celeris delivers to a connection is one message.
A worked example
A client publishes one message to a segment that has three subscribers. That is one inbound message from the publisher plus three deliveries, a total of four messages. The publisher does not receive its own copy unless your credentials enable allowEcho. With allowEcho, that copy is a fifth message.
What counts
- Commands your clients send: publishes, subscribes and unsubscribes, and presence subscriptions and queries.
- Every delivery to every subscribed connection, including messages replayed after a reconnect.
- Presence join and leave events, once for each presence subscriber, and presence list replies.
- Notices from the server, such as connection and subscription confirmations and error replies.
- Commands the SDK resends after a rate limit.
What does not count
- WebSocket ping and pong frames that keep a connection alive.
- Messages the server drops because of a rate limit. The
RateLimitErrornotice it sends back does count. - Commands the SDK refuses before sending, such as a command larger than 2 MiB.
Rejected publishes still count
A publish that the server rejects, because it is too large or the credentials lack write permission, already reached Celeris. Thus, it counts. The error reply also counts. Keep the payload below the limit of your plan, with space for the framing and the identifiers. Do not use rejection as a size probe.
Message size and billing units
For billing, Celeris measures each message in 5 KiB units of the full encoded command, payload plus protocol overhead, rounded up. Binary payloads count the same as JSON payloads. Thus, a smaller encoding can use fewer units. The decrease depends on your data and your format.
| Encoded message size | Billable units |
|---|---|
| 200 bytes | 1 |
| 4.9 KiB | 1 |
| 5 KiB payload plus overhead | 2 |
| 12 KiB | 3 |
| 64 KiB | 13 |
Two counters
Rate limits and monthly caps count messages, one for each command, independently of their size. Billing counts 5 KiB units. A 12 KiB publish uses one message of your per-second allowance, and Celeris bills it as three units.
Monthly caps and usage billing
A plan with a monthly cap counts messages in the two directions across a one-month window. When you reach the cap, the server rejects client messages with RateLimitError until the usage falls under the cap or you upgrade. Celeris never bills the Free plan for usage.
Plans marked "No cap" have no monthly message limit. Celeris charges each billable unit at the usage rate. This charge comes approximately every 30 days, in arrears, separately from the base fee.
Connection minutes and channel minutes
Celeris meters connections and channels separately from messages. One connection minute is one WebSocket connection open for one minute. One channel minute is one channel with at least one active subscriber for one minute. Rates are on the pricing page.
When you reach a limit
Limits never close an open connection. The server reports each limit where it occurs.
| Limit | What happens | What to do |
|---|---|---|
| New connections, concurrent connections or concurrent channels | The server refuses the connection attempt. The SDKs report it as a Transport error and retry with backoff during reconnection. | Close the connections that you do not need, make connection attempts less frequent, or move to a larger plan. |
| Messages per second, hour or month | The server drops the message and sends RateLimitError. The connection stays open. The SDK pauses, then resends recent commands once. | Send less frequently or combine messages. If the errors continue, move to a larger plan. |
| Maximum message size | The server rejects the publish with MessageSizeLimitError after the client sends it. The publish still counts toward usage. | Keep the payload below the limit, with space for the framing and the identifiers. |
| Encoded command size | The SDK refuses the command and does not send it. Celeris counts nothing. | Divide the payload or make it smaller. |
| SDK writer | A publish fails with Backpressure when the publish queue is full. The queue holds 64 publishes by default. | Wait for the earlier publishes to complete before you send more. |
The SDK guides explain how each client handles these errors. Start with Messaging and Reconnection and Recovery.
Your next connection
Need different limits?
Enterprise plans set custom limits. Email support@useceleris.com to speak with us, or read the FAQ.