Thanks for the quick replies Sean and Alexander.  One of our current products allows users to sign up for weather alerts based on their zip code.  When we receive a weather alert for a set of locations, we need to quickly find all users in the zip codes effected. We currently do this with a simple sql query against a relational db.  Being new at this key/value store thing, we are not sure the best way to tackle this with Riak.

Some zip codes have over 20,000 users, so storing the users in a json array with the zip code as the key would get ugly fast.  One thought was to store the user profiles in one bucket, and then add an key per user in the correct zip code bucket, perhaps with a link back to the users record in the profile bucket.  We could then fetch the keys for the effected zip codes using map reduce.  I am open to all suggestions on how to best model this type of data in Riak.

Thanks,
Scott


Sean Cribbs wrote:
Scott,

There is no limit on the number of buckets unless you are changing the bucket properties, like the replication factor, allow_mult, or the pre- and post-commit hooks.  Buckets that have properties other than the defaults consume space in the ring state.  Other than that, they are essentially free unless you're using a backend that segregates data by bucket - the only one that does at this time is innostore.

Is there a reason you need so many buckets? 

Sean Cribbs <[email protected]>
Developer Advocate
Basho Technologies, Inc.

On Sep 16, 2010, at 2:17 PM, SKester wrote:

Is there a practical (or hard) limit to the number of buckets a riak cluster can handle?  One possible data model we could use for one application could result in ~80,000 buckets.  Is that a reasonable number?

Thanks,
Scott
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to