Object storage

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 will automatically expire. After expiry, the channel is reset to its initial state and only includes an empty root object.

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.

When you update an object, the change is expressed as an operation that is sent as an object message on the channel. Like all messages, Ably stores object messages for 2 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 2 minutes, the client will be sent 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.

There is a maximum number of objects that can be stored on a channel, which is configured to 100 objects by default.

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

The maximum allowed size of a single LiveMap object is the same as the message size limit for your package. This is because objects are synchronized to the client as channel messages.

For more information, see limits .