Skip to content

Commit 42907d5

Browse files
committed
updates to hpk
1 parent fd93efa commit 42907d5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
60.5 KB
Loading

articles/cosmos-db/nosql/multi-tenancy-vector-search.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ In Azure Cosmos DB, we recommend two primary approaches to managing multi-tenanc
3232

3333
### 1. Partition key-per-tenant
3434

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.
3636

3737
**Benefits:**
3838
- **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
4747

4848
### Hierarchical partitioning: enhanced data organization
4949

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.
5151

5252
**Advantages:**
5353
- **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
5858
- 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).
5959

6060
**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.
6262

6363
![ResearchHub AI Data Stratification](../media/gen-ai/multi-tenant/hpk.png)
6464

@@ -175,7 +175,7 @@ Azure Cosmos DB's support for DiskANN vector index capability makes it an excell
175175
3. **Query Optimization:** Queries are executed using the tenant's partition key, enhancing performance by isolating data access.
176176

177177
**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.
179179
2. **Granular Data Management:** This hierarchical approach allows ResearchHub to manage and query data more efficiently, reducing latency, and improving response times.
180180

181181
**Account-Per-Tenant:**

0 commit comments

Comments
 (0)