@Justin Kim
Thank you for the question and for using Microsoft Q&A platform.
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 do indeed start incurring charges. While there isn't a hard-stop setting in Cosmos DB for throttling usage strictly within these limits, there are some workarounds and settings to help avoid unexpected charges and better control usage.
- Request Throttling: Azure Cosmos DB automatically enforces request throttling when usage exceeds the allocated Request Units (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 - Application-Level Rate Limiting: You can implement rate limiting within your application to ensure that the total operations per second sent to Azure Cosmos DB don’t surpass the allocated throughput. This proactive strategy helps manage and control usage, reducing the risk of hitting limits unexpectedly.
https://learn.microsoft.com/en-us/azure/cosmos-db/rate-limiting-requests - Monitoring and Alerts: Enable monitoring and set up alerts in Azure Monitor to track RU consumption. Alerts can notify you when your usage is nearing the free tier limits, allowing you to take action to avoid additional charges.
- Free Tier Limitations: The free tier offers 1000 RU/s and 25 GB of storage at no cost. Exceeding these limits incurs standard charges for additional throughput or storage used. However, a built-in hard-stop feature to prevent charges once the free tier limits are exceeded is not available. https://learn.microsoft.com/en-us/azure/cosmos-db/free-tier
Regarding the option about the total throughput limit setting for a Cosmos DB you can set a total throughput limit for your Azure Cosmos DB account to avoid unexpected charges. Once you set a limit to your account's total throughput, any operation that results in exceeding this limit is blocked and will explicitly fail. This includes creating a new database with shared throughput, creating a new container with dedicated throughput, increasing the provisioned throughput on a resource configured in standard (manual) mode, increasing the maximum provisioned throughput on a resource configured in autoscale mode, and adding a new region to your account.
https://learn.microsoft.com/en-us/azure/cosmos-db/throughput-serverless
While creating a Cosmos DB we have two options for the capacity mode provisioned throughput and serverless. While creating a new Cosmos DB , provisioned throughput is selected as the default option.
While you select the cost management option in the Cosmos DB, the option to limit the account's total provisioned throughput is already selected. Hence you do not see the option enabled for save.
When you change the RU/s value in the second option from 1000 to any other value, the save button will be enabled.
Hope this helps. Do let us know if you have any further queries.
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.