CosmosDB settings for databas and container

Abhishek Tomar 21 Reputation points
2023-05-07T19:59:28.95+00:00

I have a cosmos db database with autoscale max RU/s is 10k inside the database I have a container with Manual throughout RA/u 6000 how does this container work like autoscale or manual?

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,901 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Konstantinos Passadis 19,586 Reputation points MVP
    2023-05-07T20:18:26.0366667+00:00

    Hello @Abhishek Tomar !

    The throughput of a container in Cosmos DB can be set to either manual or autoscale.

    If the throughput is set to manual, it means that the provisioned throughput (in RU/s) for the container is fixed and does not change automatically. This is useful if you want to have fine-grained control over the throughput of the container.

    If the throughput is set to autoscale, it means that Cosmos DB will automatically adjust the throughput of the container based on the workload. The maximum throughput (in RU/s) for the container is determined by the maximum RU/s value set for the database, which in your case is 10k.

    In your scenario, if the throughput for the container is set to 6000 RU/s, it means that it is a manually provisioned throughput and will not change automatically based on the workload. However, it cannot exceed the maximum RU/s value set for the database (10k).

    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards

    0 comments No comments

  2. RahulRandive 10,486 Reputation points Volunteer Moderator
    2023-05-07T21:08:26.77+00:00

    @Abhishek Tomar

    Thanks for your question.

    If you have a container with manual throughput of 6000 RU/s inside a Cosmos DB database with autoscale max RU/s of 10,000, then the container will work with manual throughput of 6000 RU/s. Autoscale throughput is a separate configuration. 

    For Autoscale configuration, in the portal, you can see the configuration like below

    User's image

    You can also enable autoscale on existing database or container.

    Autoscale provisioned throughput in Azure Cosmos DB allows you to scale the throughput (RU/s) of your database or container automatically and instantly. The throughput is scaled based on the usage, without impacting the availability, latency, throughput, or performance of the workload.

     If you want to use autoscale throughput for your container, you need to configure autoscale throughput for the entire database. You can configure either standard (manual) or autoscale provisioned throughput on your databases and containers. 

    Reference document - https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-provision-autoscale-throughput?tabs=api-async#azure-portal

    I hope this helps! Let me know if you have any other questions.

    Thank you!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.