locked
Number of physical partitions RRS feed

  • Question

  • If I have a small cosmos db container that will not grow and I am allocating 400RU, what is the initial number of physical partitions that will be allocated?

    My use case consists on having, say 10 logical partitions with a very small number of documents, all in one container. This container will not grow and it will have 400RU allocated to it.

    All the queries against this container will be point queries, i.e. queries against a single partition. Many of the documents will be very small (<1KB) and this will be a read heavy application during peak hours but some might be larger.

    I would like to maximize the use of the 400RU throughput we areallocating. Ideally, there is only one physical partition allocated but my understanding is that any new container configured for unlimited partitions(which we have to use given the company's policies) is automatically allocated 5 physical partitions.

    If this is the case, will each query have access to only (400/5)=80RU's before it times out?

    Saturday, May 9, 2020 4:06 PM

All replies

  • If I have a small cosmos db container that will not grow and I am allocating 400RU, what is the initial number of physical partitions that will be allocated?

    Physical partitions are an internal implementation of the system and they are entirely managed by Azure Cosmos DB. As a customer, you do not have to worry about the number or physical partitions.

    My use case consists on having, say 10 logical partitions with a very small number of documents, all in one container. This container will not grow and it will have 400RU allocated to it.

    All the queries against this container will be point queries, i.e. queries against a single partition. Many of the documents will be very small (<1KB) and this will be a read heavy application during peak hours but some might be larger.

    I would like to maximize the use of the 400RU throughput we areallocating. Ideally, there is only one physical partition allocated but my understanding is that any new container configured for unlimited partitions(which we have to use given the company's policies) is automatically allocated 5 physical partitions.

    All Logical partitions within a container share the RU's provisioned for that container (Reads and Writes). There is no limit on the number of logical partitions here. If you are designing for a read heavy workload, please see partition key guidance here

    You can provision throughput at two distinct granularities: Containers or Databases.

    If you want to share the throughput across containers within a database, provision the throughput at a database level. 

    If this is the case, will each query have access to only (400/5)=80RU's before it times out?


    The number of physical partitions has no impact on the allocated throughput for a container or database.

    -

    If this answers your query, do click “Mark as Answer” and Up-Vote for the same which might be beneficial to other community members reading this thread .

    And, if you have any further queries do let us know. 


    Monday, May 11, 2020 12:53 PM
  • Just checking in to see if the above answer(s) helped.

     

    If this answers your query, do click “Mark as Answer” and Up-Vote for the same which might be beneficial to other community members reading this thread .

    And, if you have any further queries do let us know. 

    Tuesday, May 12, 2020 10:34 AM