You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cosmos-db/nosql/multi-tenancy-vector-search.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ In Azure Cosmos DB, we recommend two primary approaches to managing multi-tenanc
32
32
33
33
### 1. Partition key-per-tenant
34
34
35
-
For a higher density of tenants and lower isolation, the partition key-per-tenant model is effective. Each tenant is assigned a unique partition key within a given container, allowing logical separation of data.
35
+
For a higher density of tenants and lower isolation, the partition key-per-tenant model is effective. Each tenant is assigned a unique partition key within a given container, allowing logical separation of data. This strategy works best when each tenant has roughly the same workload volume. If there is significant skew, customers should consider isolating those tenants in their own account. Additionally, if a single tenant has more than 20GB of data, [hierarchical partition keys (HPK)](#hierarchical-partitioning-enhanced-data-organization) should be used.
36
36
37
37
**Benefits:**
38
38
-**Cost Efficiency:** Sharing a single Cosmos DB account across multiple tenants reduces overhead.
@@ -47,7 +47,7 @@ For a higher density of tenants and lower isolation, the partition key-per-tenan
47
47
48
48
### Hierarchical partitioning: enhanced data organization
49
49
50
-
[Hierarchical partitioning](../hierarchical-partition-keys.md) builds on the partition key-per-tenant model, adding deeper levels of data organization. This method involves creating multiple levels of partition keys for more granular data management.
50
+
[Hierarchical partitioning](../hierarchical-partition-keys.md) builds on the partition key-per-tenant model, adding deeper levels of data organization. This method involves creating multiple levels of partition keys for more granular data management. The lowest level of hierarchical partitioning should have high cardinality. Typically, it is recommended to use an ID/guid for this level to ensure continuous scalability beyond 20GB per tenant.
51
51
52
52
**Advantages:**
53
53
-**Optimized Queries:** More precise targeting of subpartitions at the parent partition level reduces query latency.
@@ -58,7 +58,7 @@ For a higher density of tenants and lower isolation, the partition key-per-tenan
58
58
- If tenants have very few HPK, this can lead to bottlenecks since all documents with the same first-level key will write to the same physical partition(s).
59
59
60
60
**Example:**
61
-
ResearchHub can stratify data within each tenant’s partition by organizing it at departmental levels, facilitating efficient management and queries.
61
+
ResearchHub can stratify data within each tenant’s partition by organizing it at various levels such as "DepartmentId" and "ResearcherId," facilitating efficient management and queries.
62
62
63
63

64
64
@@ -175,7 +175,7 @@ Azure Cosmos DB's support for DiskANN vector index capability makes it an excell
175
175
3.**Query Optimization:** Queries are executed using the tenant's partition key, enhancing performance by isolating data access.
176
176
177
177
**Hierarchical Partitioning:**
178
-
1.**Multi-Level Partition Keys:** Data within a tenant’s partition is further segmented by department, project, or other relevant attributes.
178
+
1.**Multi-Level Partition Keys:** Data within a tenant’s partition is further segmented by "DepartmentId" and "ResearcherId" or other relevant attributes.
179
179
2.**Granular Data Management:** This hierarchical approach allows ResearchHub to manage and query data more efficiently, reducing latency, and improving response times.
0 commit comments