I've been doing multi-tenant with cassandra for a while, and from what I have found, it is better to keep your keyspaces down in number. That said, I have been using composite keys for my multi-tenancy now and it works great:
Column Family: User Key: [AccountId]/[UserId] This makes it super handy especially if you use the order preserving partitioner with range queries... If for example I want all of the users in account 14, I can do this range query: get User["14/":"14/~"]; But I am no great expert... just someone who is trying and loving cassandra! Ryan On Thu, Aug 25, 2011 at 1:20 AM, Himanshi Sharma <himanshi.sha...@tcs.com>wrote: > > I am working on similar sort of stuff. As per my knowledge, creating > keyspace for each tenant would impose lot of memory constraints. > > Following Shared Keyspace and Shared Column families would be a better > approach. And each row in CF could be referred by tenant_id as row key. > And again it depends on the type of application. > > Hey this is just a suggestion, m not completely sure.. :) > > > Himanshi Sharma > > > > > From: Guofeng Zhang <guofen...@gmail.com> To: user@cassandra.apache.org > Date: 08/25/2011 10:38 AM Subject: For multi-tenant, is it good to have a > key space for each tenant? > ------------------------------ > > > > I wonder if it is a good practice to create a key space for each tenant. > Any advice is appreciated. > > Thanks > > > =====-----=====-----===== > Notice: The information contained in this e-mail > message and/or attachments to it may contain > confidential or privileged information. If you are > not the intended recipient, any dissemination, use, > review, distribution, printing or copying of the > information contained in this e-mail message > and/or attachments to it are strictly prohibited. If > you have received this communication in error, > please notify us by reply e-mail or telephone and > immediately and permanently delete the message > and any attachments. Thank you > > >