Key Expiry in Riak

Tristan Sloughter tristan.sloughter at gmail.com
Wed Mar 2 11:53:30 EST 2011


Is this possible when using innodb? Or would I use innodb for my persistent
data and a bitcask backend (like your sessions example) for data I want to
expire?

Thanks,
Tristan

On Wed, Mar 2, 2011 at 8:13 AM, Sean Cribbs <sean at basho.com> wrote:

> Abhishek,
>
> Mostly answered here:
> https://help.basho.com/entries/466512-how-can-i-automatically-expire-a-key-from-riak
>
> If you use multi_backend with several bitcask setups you can have both
> expiring data and normal persistent data. Here's an example of what you
> might put in app.config (inside the riak_kv section):
>
> {storage_backend, riak_kv_multi_backend},
> {multi_backend_default, <<"bitcask">>},
> {multi_backend, [
>        {<<"bitcask">>, riak_kv_bitcask_backend, []},
>        {<<"sessions>>, riak_kv_bitcask_backend, [{expiry_secs, 7200},
> {data_root, "data/sessions"}]}
> ]},
>
> The key pieces there is expiry_secs = 7200 (2 hours), and the separate root
> for the data files.
>
> Sean Cribbs <sean at basho.com>
> Developer Advocate
> Basho Technologies, Inc.
> http://basho.com/
>
>
> P.S. If you haven't seen the Knowledge Base yet, check it out:
> https://help.basho.com/forums/270314-riak. You can also search the KB from
> the #riak IRC channel using "!kb <search terms>".
>
> On Mar 2, 2011, at 8:21 AM, Abhishek Kona wrote:
>
> > Hi
> >
> > Is it possible to have a expiry (ttl) on RIAK keys per bucket (or per
> key).
> > Or is there any other way that I am missing.
> >
> > This would be greatly useful for maintaining Session data in RIAK, as
> expired session data can be auto cleared.
> >
> > -Abhishek Kona
> >
> > _______________________________________________
> > riak-users mailing list
> > riak-users at lists.basho.com
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110302/43027333/attachment.html>


More information about the riak-users mailing list