简体   繁体   English

在 Cosmos DB 中的逻辑分区之间拆分物理分区的可用吞吐量如何?

[英]How is the throughput available for a physical partition split amongst its logical partition in Cosmos DB?

I am trying to understand the relationship between Physical/Logical partitions and throughput availability in Azure Cosmos DB and have a question about the throughput available to each logical partition.我试图了解 Azure Cosmos DB 中物理/逻辑分区与吞吐量可用性之间的关系,并对每个逻辑分区可用的吞吐量有疑问。

Is the throughput available for a physical partition split evenly amongst its logical partitions or is it randomly distributed in the sense that any logical partition can use 0 - 100% of the throughput available to the physical partition?物理分区的可用吞吐量是在其逻辑分区之间平均分配还是随机分布,因为任何逻辑分区都可以使用物理分区可用吞吐量的 0-100%?

The reason I ask this is because I am seeing conflicting answers.我问这个的原因是因为我看到了相互矛盾的答案。

  1. In this Cosmos DB Conf presentation - Partitioning Tips for Azure Cosmos DB to Increase Performance and Save Money , the presenter mentioned that throughput available for a physical partition is evenly distributed amongst all logical partitions inside that physical partition (or at least that's what I inferred).在此 Cosmos DB Conf 演示文稿 - Partitioning Tips for Azure Cosmos DB to Increase Performance and Save Money中,演讲者提到物理分区可用的吞吐量均匀分布在该物理分区内的所有逻辑分区中(或者至少这是我推断的) .

  2. However the documentation I referenced, mentions the following ( emphasis mine ).但是,我引用的documentation提到了以下内容(强调我的)。

If you provision a throughput of 18,000 request units per second (RU/s), then each of the three physical partition can utilize 1/3 of the total provisioned throughput.如果您配置每秒 18,000 个请求单位 (RU/s) 的吞吐量,则三个物理分区中的每一个都可以利用总配置吞吐量的 1/3。 Within the selected physical partition, the logical partition keys Beef Products, Vegetable and Vegetable Products, and Soups, Sauces, and Gravies can, collectively, utilize the physical partition's 6,000 provisioned RU/s .在选定的物理分区内,逻辑分区键 Beef Products、Vegetable and Vegetable Products 以及 Soups, Sauces 和 Gravies 可以共同利用物理分区的 6,000 预置 RU/s

From the documentation it seems the size or utilization of a logical partition does not really matter and I could have some logical partitions getting more requests than others but as long as I am not exceeding the available throughput of the physical partition, I should be fine.从文档来看,逻辑分区的大小或利用率似乎并不重要,我可以让一些逻辑分区获得比其他分区更多的请求,但只要我不超过物理分区的可用吞吐量,我应该没问题。 Is this correct?这个对吗?

PS This is part 2 of the question I posted here: Some questions about Cosmos DB Physical and Logical Partitions . PS 这是我在此处发布的问题的第 2 部分: 关于 Cosmos DB 物理和逻辑分区的一些问题

Is the throughput available for a physical partition split evenly amongst its logical partitions or is it randomly distributed in the sense that any logical partition can use 0 - 100% of the throughput available to the physical partition?物理分区的可用吞吐量是在其逻辑分区之间平均分配还是随机分布,因为任何逻辑分区都可以使用物理分区可用吞吐量的 0-100%?

The throughput is equally distributed amongst the physical partitions.吞吐量在物理分区之间平均分配。 Within a physical partition, it is NOT distributed equally amongst the logical partitions.在物理分区内,它不会在逻辑分区之间平均分配。 So each logical partition can use from 0-100% of the throughput assigned for that physical partition.因此,每个逻辑分区可以使用为该物理分区分配的吞吐量的 0-100%。 And if the total utilization of the physical partition goes beyond 100%, that is when you will see throttling errors.如果物理分区的总利用率超过 100%,那么您就会看到限制错误。

From the documentation it seems the size or utilization of a logical partition does not really matter and I could have some logical partitions getting more requests than others but as long as I am not exceeding the available throughput of the physical partition, I should be fine.从文档来看,逻辑分区的大小或利用率似乎并不重要,我可以让一些逻辑分区获得比其他分区更多的请求,但只要我不超过物理分区的可用吞吐量,我应该没问题。 Is this correct?这个对吗?

This is kind of true.这是真的。 The logical partition size does matter, meaning it can't be more than 20GB.逻辑分区大小确实很重要,这意味着它不能超过 20GB。 The utilization is also limited to 10K RU/s.利用率也限制在 10K RU/s。 We have no control on how the logical partitions are split into the physical partitions so there is no real way for you to know on which physical partition your logical partitions lie in. Similarly there is no means to ensure that you don't exceed the 10K throughput of a physical partition.我们无法控制如何将逻辑分区拆分为物理分区,因此您无法真正知道您的逻辑分区位于哪个物理分区。同样,无法确保您不超过 10K物理分区的吞吐量。 This is why MS recommends that you choose your partition key so the utilization is balanced appropriately.这就是为什么 MS 建议您选择分区键以便适当平衡利用率的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM