-
Notifications
You must be signed in to change notification settings - Fork 46
[DX-883] Addresses message billing docs gap #3234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
095da8d
Addresses message billing docs gap
umair-ably 9370934
separates Chat and pubsub billing concerns
umair-ably c2f04df
Centralise message billing into platform pricing and add product-spec…
umair-ably a0fbf87
Expand central message-counting page with all products and detailed o…
umair-ably 8cff2d9
Add product-specific pricing pages for Spaces and LiveObjects
umair-ably c28f452
Expand Chat and Pub/Sub pricing pages with operations tables and opti…
umair-ably d42941c
Update navigation to include product pricing pages
umair-ably bc25ca9
Address PR comments inc. adding pricing pages for AI Transport and Li…
umair-ably 53b4245
splits connection and channels, and cleans up table links
umair-ably 736b73b
Group operations tables by feature with section-header rows
umair-ably 5d3a5b6
docs(pricing): address review feedback on product pricing pages
umair-ably ea397d5
docs(ai-transport): remove AI Transport pricing page
umair-ably 4791ddf
docs(ai-transport): remove AI Transport section from message counting
umair-ably 1d1e8f3
docs(pricing): fix moderation billing and clarify inbound/outbound me…
umair-ably File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,6 +62,10 @@ export default { | |
| }, | ||
| ], | ||
| }, | ||
| { | ||
| name: 'Spaces pricing', | ||
| link: '/docs/spaces/pricing', | ||
| }, | ||
| ], | ||
| api: [ | ||
| { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| --- | ||
| title: "Chat pricing" | ||
| meta_description: "Understand how Chat SDK features contribute to your message count, including messages, typing indicators, reactions, and cost optimization strategies." | ||
| meta_keywords: "chat pricing, message counting, typing indicators, reactions, cost optimization" | ||
| intro: "How Chat SDK features contribute to your message count and strategies to optimize costs." | ||
| --- | ||
|
|
||
| The [Chat SDK](/docs/chat) is built on top of [Pub/Sub](/docs/pub-sub). All Chat operations generate Pub/Sub messages that follow the same counting rules. | ||
|
|
||
| ## Chat operations <a id="operations"/> | ||
|
|
||
| The following table shows how Chat operations contribute to your message count: | ||
|
|
||
| | Operation | Messages counted | | ||
| | --- | --- | | ||
| | [Messages](/docs/chat/rooms/messages) || | ||
| | Send message | 1 inbound message | | ||
| | Message delivery | 1 outbound message per subscriber | | ||
| | Update message | 1 inbound message | | ||
| | Message update delivery | 1 outbound message per subscriber | | ||
| | Delete message | 1 inbound message | | ||
| | Message deletion delivery | 1 outbound message per subscriber | | ||
| | [History](/docs/chat/rooms/history) || | ||
| | History retrieval | 1 outbound message per retrieved message | | ||
| | [Typing indicators](/docs/chat/rooms/typing) || | ||
| | Typing keystroke | 1 inbound message; repeats every heartbeat interval (default 10s) | | ||
| | Typing keystroke delivery | 1 outbound message per subscriber per heartbeat | | ||
| | Typing stop | 1 inbound message | | ||
| | Typing stop delivery | 1 outbound message per subscriber | | ||
| | [Room reactions](/docs/chat/rooms/reactions) || | ||
| | Room reaction | 1 inbound message | | ||
| | Room reaction delivery | 1 outbound message per subscriber | | ||
| | [Message reactions](/docs/chat/rooms/message-reactions) || | ||
| | Message reaction send | 1 inbound message | | ||
| | Message reaction delete | 1 inbound message | | ||
| | Message reaction summary delivery | 1 outbound message per subscriber; multiple reactions may be rolled up into a single summary | | ||
| | [Presence](/docs/chat/rooms/presence) || | ||
| | Presence enter | 1 inbound message | | ||
| | Presence leave | 1 inbound message | | ||
| | Presence update | 1 inbound message | | ||
| | Presence event delivery | 1 outbound message per presence subscriber | | ||
| | [Occupancy](/docs/chat/rooms/occupancy) || | ||
| | Occupancy event | 1 outbound message per subscriber (generated on membership changes, debounced up to 15s) | | ||
| | [Moderation](/docs/chat/moderation) || | ||
| | Moderation rule invocation (before or after publish) | 1 outbound webhook event per moderated message | | ||
|
|
||
| ## Rooms and channels <a id="channels"/> | ||
|
|
||
| Each Chat [room](/docs/chat/rooms) is backed by a single Ably Pub/Sub channel. All room features, such as messages, typing, reactions, presence, and occupancy, share that one channel. | ||
|
|
||
| Channels contribute to your [channel count](/docs/platform/pricing#channels). The more rooms a client is attached to, the more channels are consumed. [Detach](/docs/chat/rooms#detach) from rooms when they are no longer needed, and [release](/docs/chat/rooms#release) rooms that are no longer in use to reduce your channel count. | ||
|
|
||
| ## Connections <a id="connections"/> | ||
|
|
||
| Ably bills each connected client for [connection minutes](/docs/platform/pricing#connections). A connection-minute is counted for every minute a client maintains an open connection, regardless of activity. Clients that remain connected but idle still accrue connection minutes. Close connections when the client is done to stop accruing connection minutes. | ||
|
|
||
| ## Cost optimization <a id="optimization"/> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it worth adding some quick info on detaching from rooms and closing connections? |
||
|
|
||
| ### Reduce typing indicator frequency | ||
|
|
||
| Increase the `heartbeatThrottleMs` [room option](/docs/chat/rooms#typing) to reduce typing indicator event frequency. The default is 10 seconds. Increase this value in rooms that tolerate delayed typing feedback. | ||
|
|
||
| ### Use server-side batching | ||
|
|
||
| [Server-side batching](/docs/messages/batch#server-side) groups messages into single deliveries. Use this for high-throughput rooms where slight delay is acceptable. | ||
|
|
||
| ### Use occupancy instead of presence | ||
|
|
||
| Use [occupancy](/docs/chat/rooms/occupancy) instead of [presence](/docs/chat/rooms/presence) when you only need member counts, not individual identities. | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| --- | ||
| title: "LiveObjects pricing" | ||
| meta_description: "Understand how LiveObjects operations contribute to your message count, including LiveMap, LiveCounter, synchronization, and REST API usage." | ||
| meta_keywords: "LiveObjects pricing, message counting, LiveMap, LiveCounter, ObjectMessages" | ||
| intro: "How LiveObjects operations contribute to your message count and strategies to optimize costs." | ||
| redirect_from: | ||
| - /docs/liveobjects/concepts/billing | ||
| --- | ||
|
|
||
| Ably bills LiveObjects operations using ObjectMessages. An ObjectMessage is the unit of change in LiveObjects. Each state mutation, such as setting a key, incrementing a counter, or creating an object, generates one or more ObjectMessages. Each ObjectMessage follows the standard inbound/outbound counting pattern. | ||
|
|
||
| ## LiveObjects operations <a id="operations"/> | ||
|
|
||
| The following table shows how LiveObjects operations contribute to your message count: | ||
|
|
||
| | Operation | Messages counted | | ||
| | --- | --- | | ||
| | [LiveMap](/docs/liveobjects/map) || | ||
| | LiveMap set or remove | 1 inbound message per operation | | ||
| | LiveMap create (shallow) | 2 inbound messages (create + assign) | | ||
| | [LiveCounter](/docs/liveobjects/counter) || | ||
| | LiveCounter increment or decrement | 1 inbound message | | ||
| | LiveCounter create | 2 inbound messages (create + assign) | | ||
| | ObjectMessage delivery | 1 outbound message per connected client | | ||
| | [Synchronization](#synchronization) | 1 outbound message per object synchronized | | ||
| | [REST API](#rest-api) fetch | 1 outbound message per object in response | | ||
| | [Batch](/docs/liveobjects/batch) operation | 1 inbound message per operation in the batch | | ||
|
|
||
| Nested object creation generates additional messages for each nested object. | ||
|
|
||
| ## Channels <a id="channels"/> | ||
|
|
||
| Each LiveObjects channel contributes to your [channel count](/docs/platform/pricing#channels). Subscribing to updates does not affect the number of messages received by a client. Any client attached to a channel with the `object-subscribe` capability automatically receives all object messages for that channel. Subscribing to updates on an object adds a listener that is called whenever the client receives updates for that object. | ||
|
|
||
| ## Connections <a id="connections"/> | ||
|
|
||
| Ably bills each connected client for [connection minutes](/docs/platform/pricing#connections). A connection-minute is counted for every minute a client maintains an open connection, regardless of activity. Clients that remain connected but idle still accrue connection minutes. | ||
|
|
||
| ## Cost optimization <a id="optimization"/> | ||
|
|
||
| ### Prefer flat data structures | ||
|
|
||
| Setting a primitive value on a LiveMap costs one message. Creating a nested LiveMap costs two or more messages (one to create the object, one to assign it), plus additional messages for each level of nesting. Flatten your data model where possible to reduce the number of messages per update. | ||
|
|
||
| ### Minimize objects per channel | ||
|
|
||
| Each object on a channel is synchronized when a client attaches or resynchronizes. Fewer objects per channel reduces the cost of synchronization. Distribute objects across channels based on which clients need access to them. | ||
|
|
||
| ## Synchronization <a id="synchronization"/> | ||
|
|
||
| During initial synchronization and resynchronization, Ably sends each object on the channel as a message. | ||
|
|
||
| For example, if a channel contains 10 objects (such as `LiveMap` and `LiveCounter` instances), a client attaching to the channel receives 10 messages during synchronization. | ||
|
|
||
| Similarly, if a client becomes disconnected and needs to resynchronize, it receives messages for each object that needs to be synchronized. | ||
|
|
||
| Only [reachable](/docs/liveobjects/concepts/objects#reachability) objects are counted. Ably may send [tombstone](/docs/liveobjects/concepts/objects#tombstones) objects to the client, but these will not count towards your usage. | ||
|
|
||
| ## REST API <a id="rest-api"/> | ||
|
|
||
| The [LiveObjects REST API](/docs/liveobjects/rest-api-usage) also counts messages for operations performed. | ||
|
|
||
| When fetching objects via the REST API, each instance of an [object type](/docs/liveobjects/concepts/objects#object-types) included in the response is counted as one message. | ||
|
|
||
| Each operation published via the REST API counts as one message. When creating objects using the `path` field, the server constructs two messages (a create operation and a `MAP_SET` operation to assign it). |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest something like this format, to make the tables more readable and have fewer repeated links: