Cassandra multiple clusters or column families?

I am currently working on a product where I need to store actions in Cassandra DB. Since our business comes from a multi-user application environment, we need to model our data in accordance with the tenant's principles. What is the best approach to scaling?

  • Create a key space for each tenant
  • Store actions in the same key space with the corresponding secondary index related to the tenant.

For publishing purposes, we are going to reuse the existing WSO2-BAM data publisher and will be used to get the target.

Appreciate your thoughts and previous experience.

+4
source share
1 answer

I would be inclined to use one keyspace and several column families, primarily because the actions you store are like a single logical dataset.

If you use multiple key areas, your application must contain some logic to figure out which one to request. I think this type of logic is best advancing to Kassandra (through the tenant's awareness index).

+1
source

Source: https://habr.com/ru/post/1531594/


All Articles