Object storage

Open in

Default object storage - 90 days

Ably durably stores all objects on a channel for a retention period that is configured to 90 days by default. If the data is not updated within the retention period, it automatically expires. After expiry, the channel is reset to its initial state and only includes an empty channel objectroot object.

Store objects outside of Ably

You can store your objects outside of Ably by obtaining the channel objects via the REST API and storing them in your own database. This is useful if you want to keep a permanent record of the objects on a channel or if you want to perform analytics on the data.

In order to receive notifications when the objects on a channel are updated, use inband objects to receive updates as regular channel messages.

Operation storage

When you update an object, the change is expressed as an operation. Ably sends this as an object message on the channel. Like all messages, Ably stores object messages for two minutes by default.

This means that if a client disconnects from Ably for a short period of time, it can automatically retrieve any operations it may have missed when it reconnects. If a client disconnects for longer than two minutes, Ably sends the client the latest state of the objects on the channel (which are durably stored for 90 days) when it reconnects, ensuring the client remains fully synchronized.

Operations themselves are not included in the history or rewind backlog of a channel. Instead, you should interact with objects directly via the client library.

Object size limit

The channel object has a maximum size limit, the default is 6.5(MB). This takes into account the size of every LiveObject (Map and Counter). When calculating the size of a channel object, Ably ignores any object or map entry with a tombstone.

A LiveCounter is a double-precision floating-point number and has a size of 8 bytes.

The size of a LiveMap object is calculated as the sum of the length of all keys plus the size of all values where:

  • string values are the length of the string
  • number values are 8 bytes
  • boolean values are 1 byte
  • bytes values are the length of the byte array
  • JSON-serializable object or array values are equal to the length of their corresponding JSON strings

For more information, see limits.