Database / Weaviate Vector database Interview questions
What is multi-tenancy in Weaviate?
Multi-tenancy in Weaviate creates isolated data partitions within a single collection, one per tenant, with each tenant's data stored in its own physical segment on disk rather than being commingled with other tenants' data in shared storage.
client.collections.create( name="Documents", multi_tenancy_config=Configure.multi_tenancy(enabled=True) ) collection = client.collections.get("Documents") collection.tenants.create(["tenant-a", "tenant-b"]) tenant_collection = collection.with_tenant("tenant-a") tenant_collection.query.near_text(query="quarterly report")
Queries automatically scope to the requesting tenant's partition, so there's no risk of one tenant's query inadvertently returning another tenant's data, and this native isolation is paired with full RBAC support for controlling which users or API keys can access which tenants. Because each tenant's data can independently use a Flat, Dynamic, or HNSW index depending on its own size, multi-tenancy pairs naturally with the Dynamic index strategy described earlier.
More Related questions...