Skip to content

[DX-883] Addresses message billing docs gap#3234

Open
umair-ably wants to merge 1 commit intomainfrom
DX-883-message-billing
Open

[DX-883] Addresses message billing docs gap#3234
umair-ably wants to merge 1 commit intomainfrom
DX-883-message-billing

Conversation

@umair-ably
Copy link
Contributor

Description

Addresses message billing docs gap as per llm-eval docs audit

Checklist

@coderabbitai
Copy link

coderabbitai bot commented Mar 2, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch DX-883-message-billing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@umair-ably umair-ably changed the title Addresses message billing docs gap [DX-883] Addresses message billing docs gap Mar 2, 2026
@umair-ably
Copy link
Contributor Author

@m-hulbert couple of questions for this one:

  1. Do we think a separate page for message billing is appropriate when we already have a billing page at the same menu level?
  2. We touch on both Chat and Pub/Sub... do we think that justifies breaking this up into dedicated pages for each product? (My thoughts were not which is why I didn't do it - seems right to leave all the pricing in 1 section imo, but happy to change if you feel that's the right thing to do)

@umair-ably umair-ably force-pushed the DX-883-message-billing branch from e85cf45 to de53456 Compare March 2, 2026 13:37
@umair-ably umair-ably marked this pull request as ready for review March 2, 2026 13:37
Every message sent through Ably is counted for both publishing and delivery:

* 1 publish = 1 inbound message
* Each subscriber delivery = 1 outbound message per subscriber
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for each delivery to integrations (also applies to messages from log/stats metachannels)


## Message size <a id="message-size"/>

Message size is calculated as the sum of the `name`, `clientId`, `data`, and `extras` [properties](/docs/api/realtime-sdk/messages#properties) before any compression or expansion occurs in the serialization process.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LiveObjects and Annotations have different schemes

| --- | --- | --- |
| Publish to channel | 1 inbound + 1 per subscriber outbound | Base cost for all messaging |
| Persisted message storage | +1 per message stored | Enable via [channel rules](/docs/storage-history/storage) |
| History retrieval | +1 per message retrieved | Each call to the [history API](/docs/storage-history/history) |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wording on the last column may introduce confusion

| Persisted message storage | +1 per message stored | Enable via [channel rules](/docs/storage-history/storage) |
| History retrieval | +1 per message retrieved | Each call to the [history API](/docs/storage-history/history) |
| Presence enter/leave/update | 1 inbound + 1 per presence subscriber outbound | Same counting as regular messages |
| Typing indicator heartbeat | 1 inbound + 1 per room member outbound | Controlled by `heartbeatThrottleMs` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels weird to randomly throw in a Chat principle amid general platform pricing. Should there be a dedicated page for Chat pricing?


Retrieving persisted messages via the [history API](/docs/storage-history/history) also counts: each message returned in a history response = 1 additional message.

To avoid persistence costs on messages that don't need history, mark them as [ephemeral](/docs/pub-sub/advanced#ephemeral).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But also don't need rewind, integrations and other functions - it's not just history

* Subscribe to presence updates only on channels where you need member-level detail.

## Chat-specific billing <a id="chat"/>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth a chat-specific page?


Each chat message published to a room = 1 inbound + 1 per subscriber outbound.

Each typing indicator heartbeat event = 1 inbound + 1 per subscriber outbound. At the default 10-second heartbeat, one active typer generates approximately six events per minute. In a room with 50 subscribers, this is approximately **306 messages per minute** per active typer.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for explicit stop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants