Overview
In multi-tenant applications, data from different customers must be strictly isolated to prevent cross-tenant data leakage. Each tenant’s queries should only retrieve documents from their own data partition.Isolation strategies
Each vector database uses a different approach to tenant isolation:| Database | Isolation Strategy | Scale | Description |
|---|---|---|---|
| Milvus | Partition key with filter expressions | Millions of tenants | Partition key field automatically routes data to tenant-specific partitions |
| Weaviate | Native multi-tenancy with per-tenant shards | Enterprise-grade | Each tenant gets dedicated shard with strong isolation guarantees |
| Pinecone | Namespace-based isolation | 100,000+ tenants | Tenant data stored in separate namespaces within shared index |
| Qdrant | Payload-based with optimized indexes | Tiered promotion | Metadata-based filtering with automatic index promotion for large tenants |
| Chroma | Tenant and database scoping | Flexible | Collection-per-tenant or database-per-tenant based on scale |
Configuration
Configure multi-tenancy for your chosen database:Usage example
Tenant management
List tenants
Delete tenant
Framework support
Multi-tenancy pipelines are available for both frameworks:Isolation guarantees
Milvus partition key isolation
Milvus partition key isolation
Mechanism: Partition key field with automatic routingGuarantees:
- Data physically separated into tenant-specific partitions
- Filter expressions automatically scoped to partition
- Zero cross-tenant data leakage
- Optimized for millions of tenants
Weaviate native multi-tenancy
Weaviate native multi-tenancy
Mechanism: Per-tenant shards with collection-level isolationGuarantees:
- Each tenant gets dedicated shard(s)
- Physical isolation at storage layer
- Independent tenant lifecycle management
- Enterprise-grade security boundaries
Pinecone namespace isolation
Pinecone namespace isolation
Mechanism: Namespace-based logical partitioningGuarantees:
- Logical isolation within shared index
- Query-time namespace filtering
- Supports 100,000+ namespaces per index
- Automatic scaling and management
Qdrant payload filtering
Qdrant payload filtering
Mechanism: Metadata-based filtering with index optimizationGuarantees:
- Tenant ID in payload metadata
- Automatic index creation for tenant field
- Tiered approach: small tenants share collection, large tenants promoted
- Efficient filtering with minimal overhead
Chroma tenant scoping
Chroma tenant scoping
Mechanism: Collection-per-tenant or database-per-tenantGuarantees:
- Complete physical isolation
- Independent collection management
- Flexible deployment strategies
- Simple access control
Security best practices
Validate tenant IDs
Always validate and sanitize tenant IDs before passing to pipelines. Prevent injection attacks by using allow-lists or UUID validation.
Enforce at application layer
Never rely solely on database isolation. Validate tenant access at the application layer before executing queries.
Performance at scale
Benchmarks by tenant count
| Tenant Count | Milvus | Weaviate | Pinecone | Qdrant | Chroma |
|---|---|---|---|---|---|
| 100 | ⚡ Fast | ⚡ Fast | ⚡ Fast | ⚡ Fast | ⚡ Fast |
| 1,000 | ⚡ Fast | ⚡ Fast | ⚡ Fast | ⚡ Fast | 🔶 Moderate |
| 10,000 | ⚡ Fast | ⚡ Fast | ⚡ Fast | ⚡ Fast | ⚠️ Slow |
| 100,000+ | ⚡ Fast | ⚡ Fast | ⚡ Fast | 🔶 Moderate | ❌ N/A |
| 1,000,000+ | ⚡ Fast | 🔶 Moderate | ⚡ Fast | 🔶 Moderate | ❌ N/A |
Cost optimization
Resource sharing strategies
Migration between strategies
Migrate from shared to dedicated isolation as tenants grow:Related features
Namespaces
Logical data partitioning
Metadata filtering
Structured constraints
Cost-optimized RAG
Efficient production pipelines
Agentic RAG
Multi-step retrieval loops