[DX-883] Addresses message billing docs gap#3234
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@m-hulbert couple of questions for this one:
|
e85cf45 to
de53456
Compare
| 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 |
There was a problem hiding this comment.
+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. |
There was a problem hiding this comment.
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) | |
There was a problem hiding this comment.
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` | |
There was a problem hiding this comment.
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). |
There was a problem hiding this comment.
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"/> | ||
|
|
There was a problem hiding this comment.
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. |
src/data/nav/chat.ts
Outdated
| ], | ||
| }, | ||
| { | ||
| name: 'Message billing', |
There was a problem hiding this comment.
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?
|
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. |
031b0df to
5e125be
Compare
m-hulbert
left a comment
There was a problem hiding this comment.
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
src/data/nav/chat.ts
Outdated
| ], | ||
| }, | ||
| { | ||
| name: 'Pricing', |
There was a problem hiding this comment.
I think it wouldn't hurt to prefix these with the product name in the nav, so "Chat pricing".
src/data/nav/platform.ts
Outdated
| }, | ||
| { | ||
| link: '/docs/platform/pricing/message-billing', | ||
| name: 'Message billing', |
There was a problem hiding this comment.
| name: 'Message billing', | |
| name: 'Message counting', |
| @@ -0,0 +1,111 @@ | |||
| --- | |||
| title: "Message billing" | |||
There was a problem hiding this comment.
| 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"> |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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"/> |
There was a problem hiding this comment.
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 | |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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"/> |
There was a problem hiding this comment.
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 @@ | |||
| --- | |||
There was a problem hiding this comment.
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).
…mization strategies
Description
Addresses message billing docs gap as per llm-eval docs audit
Checklist