Hi Mykhailo Saienko,
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
We sincerely apologize for the inconvenience caused.
It appears that there are some unexpected charges on your Azure Cosmos DB free tier account. Let's review the potential causes and discuss the steps you can take to address this issue.
Firstly, in Azure Cosmos DB's Free Tier, users are granted up to 1,000 request units per second (RUs/s) and 25 GB of storage at no cost. However, if you exceed these limits, you will start incurring charges.
Even though you mentioned that your usage is well below the limit, there are a few things to consider:
- Request Throttling: Azure Cosmos DB automatically enforces request throttling when usage exceeds the allocated RUs. If your application tries to consume more RUs than the provisioned amount, the requests are rate-limited, resulting in a 429 Too Many Requests status code. This feature safeguards against unexpected costs by capping throughput at the provisioned level. https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/troubleshoot-dotnet-sdk-slow-request?tabs=cpu-new
- Monitoring and Alerts: Make sure to enable monitoring and set up alerts in Azure Monitor to keep track of your RU (Request Unit) usage. These alerts will let you know if you're getting close to the free tier limits so that you can take action and avoid extra charges.
- Fixed Costs: There might be some fixed costs associated with your Cosmos DB account, even if your usage is within the free tier limits. These could include costs related to metadata traffic or other background operations
- Estimates: The charges you see might be estimates for the month. If your RU/s never exceeded 1000RU/s, these charges could be dropped at the end of the month.
To better manage and control your usage, you can implement application-level rate limiting to ensure that the total operations per second sent to Azure Cosmos DB don’t surpass the allocated throughput.
Additionally, you can review the estimated cost and start creating your resources using the Azure Cosmos DB capacity calculator
Please refer to the below mentioned links for more information.
https://learn.microsoft.com/en-us/azure/cosmos-db/free-tier
https://learn.microsoft.com/en-us/azure/cosmos-db/limit-total-account-throughput
I hope, This response will address your query and helped you to overcome on your challenges.
If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.