Why it matters
Throughput is usually set for the busiest hour. When most hours are quiet, autoscale stops you paying for the peak all day.How nOps finds it
This recommendation comes from Azure Advisor, which compares the container’s past throughput use with what autoscale would cost and suggests a maximum RU/s. nOps imports Advisor’s recommendations daily and checks each one against your own Azure bill for the last 7 complete days: the resource must still be billed in the last 3 days of that window, and Advisor’s estimate is capped at what the Cosmos DB account actually cost (Advisor prices at pay-as-you-go rates, so you may pay less through discounts, reservations or savings plans). Recommendations worth less than $1 a month are left out.Before you start
Permission to change throughput on the Cosmos DB account.How to implement
- In the Azure portal, open the Cosmos DB account, then Data Explorer, and select the database or container.
- Open Scale & Settings (or Scale), choose Autoscale, and set the maximum RU/s shown in the recommendation. Save.
- Or use the Azure CLI, for example
az cosmosdb sql container throughput migrate --throughput-type autoscale ...and then set the maximum withaz cosmosdb sql container throughput update --max-throughput MAX_RU .... - Update Terraform, Bicep or ARM templates (
autoscale_settingswithmax_throughput) so a later deployment does not switch it back.
Risks and considerations
- Each autoscale RU/s costs more than a standard RU/s, so autoscale only saves money when usage is often well below the peak.
- Autoscale never goes below 10% of the maximum.
- Reserved capacity bought for standard throughput applies differently to autoscale.
- To roll back, migrate the throughput back to manual.