Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can logical partitions from different containers get stored on the same underlying physical partition? (Database level provisioned)

Whenever you provision a number of RU/s on a cosmosdb container (standard or autoscale), these RU/s will be divided evenly among all underlying physical partitions. Each of these physical partitions will contain one or more logical partitions, depending on the storage and provisioned throughput.

But I was wondering what happens when you provision throughput on a database level instead of a container level. Can logical partitions from different containers (within the same database with provisioned throughput) get stored on the same underlying physical partition? Or will different containers always use different physical partitions?

In the case of the latter this means that the maxRU/s of a container - in an environment where resources are provisioned on a database level - would maximally be (#RU/s on database) / #Containers.

Based on the documentation I somewhat assume that a physical partition can hold logical partitions from different containers. But I can't seem to find a 100% clear description of this case.

Thanks!

like image 531
Thomas Costers Avatar asked Sep 04 '25 01:09

Thomas Costers


1 Answers

Can logical partitions from different containers (within the same database with provisioned throughput) get stored on the same underlying physical partition? Or will different containers always use different physical partitions?

Based on the information provided here, a physical partition can have logical partitions from different containers. Here's the image from the link:

enter image description here

More from the same link:

Because all containers within the database share the provisioned throughput, Azure Cosmos DB doesn't provide any predictable throughput guarantees for a particular container in that database. The portion of the throughput that a specific container can receive is dependent on:

  • The number of containers.
  • The choice of partition keys for various containers.
  • The distribution of the workload across various logical partitions of the containers.
like image 136
Gaurav Mantri Avatar answered Sep 07 '25 17:09

Gaurav Mantri