Sometimes you want to delete data that is no longer needed. Riak KV provides Global Object Expiration, which is easy to configure and lets you specify a TTL (time to live) for all objects in the cluster. This automatically deletes data at the cluster level so you don’t have to manually delete aged data.
Riak KV Global Object Expiration includes:
To enable and configure Global Object Expiration, you turn expiration on and specify a retention time in seconds, minutes, hours, etc. Data expiration is set based on your storage backend.
To set automatic expiration in LevelDB, use the retention_time
setting. In the following example, objects are configured to expire after 8 days and 9 hours:
leveldb.expiration = on leveldb.expiration.retention_time = 8d9h
To set automatic expiration in Bitcask, use the expiry
setting. In the following example, objects are configured to expire after 1 days:
bitcask.expiry = 1d
As data ages, it may no longer be needed. Object Expiration provides an optimized solution for deleting large volumes of aging data to maximize the efficiency of your application.
Reduce operational costs
By automatically deleting data based on policy, you eliminate the need to continuously increase storage and can reclaim space. This means less storage to manage and no need to manually delete data.
Increase performance and scale
Eliminating unwanted or unneeded data keeps your database lean and operationally efficient.
Manage massive amounts of data
Managing data, including deleting unwanted data, can make your application more efficient depending on your use case.