Skip to content

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

Open
umair-ably wants to merge 7 commits intomainfrom
DX-883-message-billing
Open

[DX-883] Addresses message billing docs gap#3234
umair-ably wants to merge 7 commits 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.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 04944b08-0eb1-4f34-8fb7-cca5eaefb762

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

@umair-ably umair-ably requested a review from AndyTWF March 3, 2026 12:20
],
},
{
name: 'Message billing',
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the right level for this particular page, it feels a bit odd sitting here but maybe that's just me.

@m-hulbert WDYT?

@m-hulbert
Copy link
Contributor

I think my view on this is that we should have a page that covers all products (i.e. every operation that counts as a message) under the pricing section in Platform. Then from that we can create dedicated 'Pricing' pages under each product that cover 'what counts as a message' as well as a recap on channel and connection minutes (e.g. note that channels = rooms) and a section on cost optimisation for each product there.

Copy link
Contributor

@m-hulbert m-hulbert left a comment

Choose a reason for hiding this comment

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

This is moving in the right direction Umair - just a few things to tidy up in terms of organisation and we're also only covering Pub/Sub and Chat in both places and not the other products?

This also seems quite dated, but we should make sure it's covered: https://faqs.ably.com/how-does-ably-count-messages

],
},
{
name: 'Pricing',
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it wouldn't hurt to prefix these with the product name in the nav, so "Chat pricing".

},
{
link: '/docs/platform/pricing/message-billing',
name: 'Message billing',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
name: 'Message billing',
name: 'Message counting',

@@ -0,0 +1,111 @@
---
title: "Message billing"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
title: "Message billing"
title: "Message counting"


All Ably products count messages for billing purposes. The following sections explain how operations across Pub/Sub, Chat, LiveObjects, and Annotations contribute to your message count.

<Aside data-type="further-reading">
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd delete this, as we're redirecting people as soon as they land on the page.

intro: "How operations across all Ably products contribute to your message count."
---

All Ably products count messages for billing purposes. The following sections explain how operations across Pub/Sub, Chat, LiveObjects, and Annotations contribute to your message count.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should reword this around messages are a unit of consumption that we charge for and it's important to understand which operations count as messages.


For Chat-specific cost optimization strategies, see [Chat pricing](/docs/chat/pricing).

## LiveObjects operations <a id="liveobjects-operations"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

We should keep the table format going throughout for consistency.


| Operation | Messages counted | Notes |
| --- | --- | --- |
| Chat message | 1 inbound + 1 per subscriber outbound | Same as a standard publish |
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to cover every possible operation on this page - e.g. edits/updates/deletes, moderation etc.


## Annotations <a id="annotations"/>

[Annotations](/docs/messages/annotations) have a different billing scheme from standard messages. See the [Annotations](/docs/messages/annotations) page for details on how annotation operations are counted.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure why annotations are at the product level, nor why we're saying they are charged differently and linking to the annotations page which doesn't cover costs.


[Annotations](/docs/messages/annotations) have a different billing scheme from standard messages. See the [Annotations](/docs/messages/annotations) page for details on how annotation operations are counted.

## Persistence billing <a id="persistence"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

These 2 sections should be covered in the tables really. I think we should review whether we need to have them dealt with separately. Reducing costs is something we should be handling on individual product pages.

@@ -0,0 +1,41 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

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

For these types of pages I think we should be able to lift and shift the product table from the 'main' page for how we count messages (integrations we may have to think about as it'll probably be a separate table... maybe link to that one?)

We should then have a section for channels (or rooms etc.) and connections that just states how they are charged. This will obviously be very light for Pub/Sub and connections in general, but the info already exists in the pricing page. For other products like Chat we obviously need to state that a channel = a room for billing purposes.

For the cost optimisation I really like this idea to include it, but would recommend that we have a short paragraph per item that briefly describes it and links out (rather than the table format), and would also say in this instance that we're missing the presence optimisations that you've initially covered on the main page (which occupancy would fall under as 1 option).

@umair-ably umair-ably requested a review from m-hulbert March 12, 2026 12:07
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.

3 participants