Understanding on Multi-tenancy

Hi Team,

we are planning to create one weaviate cluster with multiple nodes, and ask multiple internal teams to use the same cluster to store their vector data for AI apps.

  1. If team1 stores a pdf into the vector database, will team2 be able to read that vector data and vice versa ? How to ensure the data is isolated between the team1 and team 2.
  2. What tenant means ? is single team a tenant in the above scenario ? How to differentaite tenants, is it based on the username or token they use to connect ?
  3. Is there any logical database concept in weaviate for separating the teams and their data ?


hi @adithya.ch !

As long as your teams doesn’t use the same collection name, they can use the same cluster.

  1. On that case, all teams will have access to all collections. There is a feature request for Role Based Access Control, RBAC, that is in the roadmap
  2. Suppose your collection will be used for different customers, or users. You can create one tenant per customer. That way each tenant will have isolation from each other on that specific collection.

Before tenants, Weaviate developers used to create all objects in the same collection, having a property to differentiate each customers using a filter.

This was far from optimal. Not only because the data was not isolated, but also because removing a tenant triggered unnecessary change in the vector index.

Using tenants, you can remove, disable (status:COLD) or enable (status:HOT) a tenant when necessary. For example, when a user logs in, you can make it HOT, saving considerable on memory usage.

  1. There isn’t for now, Sorry :frowning: This is what RBAC should deliver when the time comes.

Please, consider giving your :+1: on RBAC feat request so we can better track/measure what should be planned for next releases.


Thanks for the detailed reply.

How to create a tenant ? is it user creation in weaviate ?


It is not a user creation. You will use the same user/password or ApiKey for that.

here is how to add a tenant on a collection (note, collection must have Multi tenancy enabled)

from weaviate.classes.tenants import Tenant

# Add two tenants to the collection

Let me know if this helps :slight_smile:

Thank you for the details.