# Spaces pricing How Spaces SDK features contribute to your message count and strategies to optimize costs. The [Spaces SDK](https://ably.com/docs/spaces.md) is built on top of [Pub/Sub](https://ably.com/docs/pub-sub.md) channels and [presence](https://ably.com/docs/presence-occupancy/presence.md). All Spaces operations generate Pub/Sub messages that follow the same counting rules. ## Spaces operations The following table shows how Spaces operations contribute to your message count: | Operation | Messages counted | | --- | --- | | [Members](https://ably.com/docs/spaces/space.md) || | Enter space | 1 inbound message | | Leave space | 1 inbound message | | Update profile | 1 inbound message | | Space event delivery | 1 outbound message per subscriber | | [Locations](https://ably.com/docs/spaces/locations.md) || | Set location | 1 inbound message | | Location event delivery | 1 outbound message per subscriber | | [Cursors](https://ably.com/docs/spaces/cursors.md) || | Set cursor position | 1 inbound message per batch (default batch interval 25ms) | | Cursor event delivery | 1 outbound message per subscriber | | [Locking](https://ably.com/docs/spaces/locking.md) || | Acquire lock | 1 inbound message | | Release lock | 1 inbound message | | Lock event delivery | 1 outbound message per subscriber | Registering multiple subscription listeners for the same event does not increase your message count. These are [client-side filtered events](https://ably.com/docs/spaces/space.md#subscribe) where only a single message is published per event by Ably. ## Channels Each space maps to an underlying Pub/Sub [channel](https://ably.com/docs/channels.md). Live cursors use a [separate channel](https://ably.com/docs/spaces/cursors.md#foundations) from other space features due to their high update frequency. Both channels contribute to your [channel count](https://ably.com/docs/platform/pricing.md#channels). ## Connections Ably bills each connected client for [connection minutes](https://ably.com/docs/platform/pricing.md#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 ### Increase cursor batch interval Increase the [`outboundBatchInterval`](https://ably.com/docs/spaces/cursors.md#batch) to reduce the frequency of cursor position updates. The default is 25ms. Increasing this value reduces the number of messages at the cost of less smooth cursor movement. ### Limit concurrent cursor streaming Ably recommends a maximum of [20 members](https://ably.com/docs/spaces/cursors.md) simultaneously streaming their cursors in a space for an optimal end-user experience. Beyond this, the volume of cursor messages increases significantly. ### Use occupancy instead of presence for large spaces For spaces with many members where you only need a count of active users, use [occupancy](https://ably.com/docs/presence-occupancy/occupancy.md) on the underlying channel instead of tracking individual presence events. ## Documentation Index To discover additional Ably documentation: 1. Fetch [llms.txt](https://ably.com/llms.txt) for the canonical list of available pages. 2. Identify relevant URLs from that index. 3. Fetch target pages as needed. Avoid using assumed or outdated documentation paths.