RU estimation in Cosmos DB

ElenaMarlowe-3376 85 Reputation points
2025-06-15T13:37:45.03+00:00

Hi,

For migrate Cosmos DB from serverless to provisioned mode, since usage can vary over time, I’m trying to figure out the best way to estimate the required RU/s before switching.

I’ve checked the "Monitoring" and "Metrics" section in the portal and can view total Request Units (RUs), but I’m not quite sure what value I should enter into the Azure Pricing Calculator. Should I base it on peak RU/s, or is it better to use an average? And should the unit be considered per second?

Any suggestions or best practices from your experience would be appreciated.

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,902 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Chiugo Okpala 1,905 Reputation points MVP
    2025-06-15T15:30:52.4266667+00:00

    @ElenaMarlowe-3376 welcome to the Microsoft Q&A community.

    N/B: I have generated the below answer using co-pilot as an AI tool. Also I have validated and updated the AI output.

    Estimating Request Units (RU/s) when transitioning from serverless to provisioned throughput in Azure Cosmos DB requires careful analysis of usage patterns. Here’s how you can approach it:

    Key considerations for RU estimation

    1. Peak vs. Average RU/s:
      • Peak RU/s ensures you have enough capacity to handle the highest bursts of activity without throttling. If your workload has significant spikes, provisioning based on peak usage would be safer.
      • Average RU/s gives a more cost-effective baseline but may lead to throttling if your workload fluctuates significantly.
      • A balanced approach is to consider peak RU/s but apply autoscale to optimize costs while ensuring performance.
    2. Units per second:
      • Since Cosmos DB provisioned mode charges based on RU/s, ensure that your calculations are done per second and not per minute/hour.

    Best practices for estimating RU/s

    • Analyze historical data Check the Metrics section in Azure Portal, especially the Total Request Units and Max RU/s consumed over a reasonable period. If your workload varies daily, a week’s worth of data provides a better estimate.
    • Use Azure Monitor alerts Set up alerts on RU consumption to track unexpected spikes.
    • Simulate the workload If feasible, create a test environment where you gradually scale RU/s up and down to see what works best.

    Thus in Azure Pricing calculator:

    • If you going to be doing manual provisioning, enter th peak RU/s value
    • If you going to be using autoscale, enter minimum expected RU/s, and Azure will sacle up when needed (up to 10x your base RU allocation).

    I hope these helps. Let me know if you have any further questions or need additional assistance.

    Also if these answers your query, do click the "Upvote" and click "Accept the answer" of which might be beneficial to other community members reading this thread.

    User's image


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.