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
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,11 +24,11 @@ Imagine a fictional AI-assisted research platform called ResearchHub. Serving th
24
24
25
25
Azure Cosmos DB, with its [DiskANN vector index](../index-policy.md#vector-indexes) capability, simplifies multitenant design, providing efficient data storage and access mechanisms for high-performance applications.
26
26
27
-
###Multi-tenancy models in Azure Cosmos DB
27
+
## Multi-tenancy models in Azure Cosmos DB
28
28
29
29
In Azure Cosmos DB, we recommend two primary approaches to managing multi-tenancy: partition key-per-tenant or account-per-tenant, each with its own set of benefits and trade-offs.
30
30
31
-
####1. Partition key-per-tenant
31
+
### 1. Partition key-per-tenant
32
32
33
33
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.
34
34
@@ -41,7 +41,7 @@ For a higher density of tenants and lower isolation, the partition key-per-tenan
41
41
-**Resource Contention:** Shared resources can lead to contention during peak usage.
42
42
-**Limited Isolation:** Logical but not physical isolation, which may not meet stringent security needs.
43
43
44
-
####Hierarchical partitioning: enhanced data organization
44
+
### Hierarchical partitioning: enhanced data organization
45
45
46
46
[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.
47
47
@@ -56,7 +56,7 @@ ResearchHub can stratify data within each tenant’s partition by organizing it
56
56

57
57
58
58
59
-
####2. Account-per-tenant
59
+
### 2. Account-per-tenant
60
60
61
61
For maximum isolation, the account-per-tenant model is preferable. Each tenant gets a dedicated Cosmos DB account, ensuring complete separation of resources.
62
62
@@ -69,7 +69,7 @@ For maximum isolation, the account-per-tenant model is preferable. Each tenant g
69
69
-**Increased Management:** Higher complexity in managing multiple Cosmos DB accounts.
70
70
-**Higher Costs:** More accounts mean higher infrastructure costs.
71
71
72
-
###Security isolation with customer-managed keys
72
+
## Security isolation with customer-managed keys
73
73
74
74
Azure Cosmos DB enables [customer-managed keys](../how-to-setup-customer-managed-keys.md) for data encryption, adding an extra layer of security for multitenant environments.
75
75
@@ -82,13 +82,13 @@ Using customer-managed keys ensures each tenant's data is encrypted uniquely, pr
82
82
83
83

84
84
85
-
###Other isolation models
85
+
## Other isolation models
86
86
87
-
####Container and database isolation
87
+
### Container and database isolation
88
88
89
89
In addition to the partition key-per-tenant and account-per-tenant models, Azure Cosmos DB provides other isolation methods such as container isolation and database isolation. These approaches offer varying degrees of performance isolation, though they don't provide the same level of security isolation as the account-per-tenant model.
90
90
91
-
#####Container isolation
91
+
#### Container isolation
92
92
93
93
In the container isolation model, each tenant is assigned a separate container within a shared Cosmos DB account. This model allows for some level of isolation in terms of performance and resource allocation.
94
94
@@ -101,7 +101,7 @@ In the container isolation model, each tenant is assigned a separate container w
101
101
-**Limited Security Isolation:** Unlike separate accounts, containers within the same account don't provide physical data isolation. So, this model may not meet stringent security requirements.
102
102
-**Resource Contention:** Heavy workloads in one container can still affect others if resource limits are breached.
103
103
104
-
#####Database isolation
104
+
#### Database isolation
105
105
106
106
The database isolation model assigns each tenant a separate database within a shared Cosmos DB account. This provides enhanced isolation in terms of resource allocation and management.
107
107
@@ -118,7 +118,7 @@ While container and database isolation models don't offer the same level of secu
118
118
119
119
By carefully evaluating the specific needs and constraints of your multitenant application, you can choose the most suitable isolation model in Azure Cosmos DB, balancing performance, security, and cost considerations to achieve the best results for your tenants.
120
120
121
-
###Real-world implementation considerations
121
+
## Real-world implementation considerations
122
122
123
123
When designing a multitenant system with Cosmos DB, consider these factors:
124
124
@@ -144,7 +144,7 @@ When designing a multitenant system with Cosmos DB, consider these factors:
144
144
2.**Customize Resources:** Tailor performance and SLAs to tenant requirements.
145
145
3.**Ensure Security:** Physical data isolation offers robust security and compliance.
146
146
147
-
###Best practices for using Azure Cosmos DB with vector search
147
+
## Best practices for using Azure Cosmos DB with vector search
148
148
149
149
Azure Cosmos DB's support for DiskANN vector index capability makes it an excellent choice for applications that require fast, high-dimensional searches, such as AI-assisted research platforms like ResearchHub. Here’s how you can leverage these capabilities:
150
150
@@ -176,7 +176,7 @@ Azure Cosmos DB's support for DiskANN vector index capability makes it an excell
176
176
2.**Custom Configurations:** Resources and SLAs are tailored to meet the specific needs of each tenant, ensuring optimal performance and security.
177
177
3.**Enhanced Data Security:** Physical separation of data with customer-managed encryption keys ensures robust security compliance.
178
178
179
-
###Conclusion
179
+
## Conclusion
180
180
181
181
Multi-tenancy in Azure Cosmos DB, especially with its DiskANN vector index capability, offers a powerful solution for building scalable, high-performance AI applications. Whether you choose partition key-per-tenant, hierarchical partitioning, or account-per-tenant models, you can effectively balance cost, security, and performance. By using these models and best practices, you can ensure that your multitenant application meets the diverse needs of your customers, delivering an exceptional user experience.
0 commit comments