Multi-tenancy allows you to serve multiple customers (tenants) from a single Qdrant collection while maintaining data isolation and performance. Qdrant provides several strategies to implement multi-tenancy efficiently.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/qdrant/qdrant/llms.txt
Use this file to discover all available pages before exploring further.
Architecture Approaches
Collection per Tenant
Isolation: MaximumComplexity: HighBest for: Less than 10 tenants
Payload Filtering
Isolation: LogicalComplexity: LowBest for: 100s-1000s tenants
Shard Keys
Isolation: PhysicalComplexity: MediumBest for: 10s-100s tenants
Payload Filtering Approach
The most common and scalable approach: store all tenants in one collection with a tenant identifier in the payload.Collection Setup
Creating Tenant Index
Mark the tenant field withis_tenant: true for optimization:
The
is_tenant flag tells Qdrant to optimize the index structure for frequent tenant-specific filtering.Inserting Tenant Data
Searching with Tenant Filter
Always filter by tenant in your searches:Python Example
Tenant Index Optimization
What is_tenant Does
When you mark a field with is_tenant: true:
- HNSW graph optimization: Qdrant builds more aggressive HNSW links within tenant boundaries
- Payload index structure: Optimized for tenant-specific lookups
- Query planning: Tenant filters are pushed down early in query execution
Index Types Supporting is_tenant
- Keyword
- UUID
- Integer
Shard Key Partitioning
For physical isolation of tenant data within a collection, use shard keys.Creating Sharded Collection
Creating Tenant Shards
Create dedicated shards for specific tenants:Inserting to Specific Shard
Searching Specific Shard
Using shard keys automatically routes operations to the correct physical shard, avoiding unnecessary cross-shard operations.
Tenant Migration
Move a tenant to its own dedicated shard:Performance Considerations
Query Performance
Always Use Indexed Filters
Always Use Indexed Filters
Create payload indexes on tenant identifiers. Without indexes, filtering requires scanning all points.
Enable is_tenant Optimization
Enable is_tenant Optimization
Mark tenant fields with This builds better connections within tenant boundaries.
is_tenant: true to enable HNSW graph optimizations:Disable Global HNSW for Pure Multi-Tenancy
Disable Global HNSW for Pure Multi-Tenancy
If you ALWAYS filter by tenant, disable global HNSW:This saves memory and forces optimized tenant-specific search.
Memory Management
Per-tenant data distribution:- Monitor tenant sizes to prevent skew
- Consider separate collections for extremely large tenants
- Use quantization to reduce per-point memory usage
- Disabled global HNSW (m=0): Only stores tenant-specific graphs
- Enabled global HNSW: Stores full graph across all tenants
Scaling Guidelines
- Small (< 100 tenants)
- Medium (100-1000 tenants)
- Large (> 1000 tenants)
Strategy: Payload filteringConfiguration:
- Single collection
- Tenant index with
is_tenant: true - Global HNSW enabled
- Simple management
- Efficient resource usage
- Good performance
Isolation and Security
Data Isolation
Payload filtering provides logical isolation only:Access Control
Implement tenant isolation at the application layer:Best Practices
Design Tenant ID Strategy
Choose stable, immutable tenant identifiers:
- UUIDs for maximum flexibility
- Integer IDs for compact storage
- String keys for human readability
Monitor Tenant Distribution
Track per-tenant sizes and query patterns:
- Large tenants may need dedicated shards
- Inactive tenants can be archived
- Hot tenants may need special handling
Common Patterns
Hierarchical Tenancy
Organization → Team → User hierarchy:Multi-Tenant with Regional Data
Combine tenant and region filtering:Monitoring and Observability
Track these metrics per tenant:- Point count: Number of vectors per tenant
- Query latency: P50, P95, P99 search times
- Query volume: Requests per tenant per time period
- Storage usage: Disk/memory consumption per tenant
- Indexing lag: Time to index new tenant data
Related Topics
- Filtering - Learn more about payload filtering capabilities
- Distributed Deployment - Detailed guide on shard key strategies
- Indexing - Optimize payload indexes for tenant fields