Azure Cosmos DB RU cost optimization: stop over-provisioning throughput
Cosmos DB bills by provisioned RU/s (~$0.008 per 100 RU/s-hour) times region count. Over-provisioned throughput and needless multi-region writes are the big overspends. Here's how to right-size and which throughput model to pick.
Quick answer
Cosmos DB bills mostly by provisioned throughput — Request Units per second at ~$0.008 per 100 RU/s-hour, with a 400 RU/s floor (~$23/mo) — plus ~$0.25/GB storage, multiplied by region count. The overspend is almost always over-provisioned RU/s or unnecessary multi-region writes. Right-size RU/s, use autoscale for variable load and serverless for dev, limit regions, and reserve committed throughput (up to ~65% off).
Cosmos DB is fast and globally distributed, and it'll bill you for both whether you need them or not. The cost model is unusual — you don't pay per query or per CPU, you pay for provisioned throughput capacity measured in Request Units. Get the RU/s sizing and the region count right and Cosmos is reasonable; get them wrong and it's one of the priciest lines on an Azure bill.
The RU model
A Request Unit normalizes the cost of an operation: a 1 KB point read is 1 RU, a write is ~5 RU, and a complex query can be hundreds. You provision a number of RU/s; exceed it and requests get throttled with 429 errors. The pricing:
100 RU/s ≈ $0.008/hour
400 RU/s (min) ≈ $23/month
10,000 RU/s ≈ $584/month
Storage ≈ $0.25/GB-month
× number of regions (and × writes if multi-region write)Pick the right throughput model
- Provisioned (manual): cheapest for steady, predictable load. You set a fixed RU/s and pay for it continuously.
- Autoscale: bills for the peak RU/s used within a 10x band (e.g. 1,000-10,000). Avoids throttling on variable load without provisioning for peak 24/7. Costs a bit more per RU than manual.
- Serverless: bills per request (~$0.25 per million RU). Cheapest for spiky, low-volume, and dev workloads; not for sustained high throughput.
The two big overspends
- Over-provisioned RU/s. Provisioning 10,000 RU/s when you use 1,000 wastes ~$500/month. Measure actual RU consumption and size to it with headroom; use autoscale if you can't predict the peak.
- Unneeded multi-region writes. Each additional region multiplies throughput cost, and enabling multi-region writes multiplies it again. Multi-region is right for genuine global low-latency writes — but many deployments enable it by default and pay 2-3x for capacity they don't need.
Other levers
- Reserved capacity: committing to throughput for 1-3 years is up to ~65% off — the biggest discount available for steady workloads.
- TTL on containers: expire old documents automatically to keep storage (and per-region storage cost) down.
- Partition key design: good partitioning means queries touch fewer partitions and cost fewer RUs — directly lowering the RU/s you need to provision.
FAQ
How is Azure Cosmos DB priced?
Primarily by provisioned throughput in Request Units per second (RU/s) at about $0.008 per 100 RU/s per hour, plus storage at ~$0.25/GB-month. The minimum provisioned throughput is 400 RU/s (~$23/month). Multi-region and multi-write multiply the throughput cost per region.
What is an RU in Cosmos DB?
A Request Unit is Cosmos DB's normalized cost of a database operation. A simple 1 KB point read is 1 RU; queries, writes, and larger items cost more. You provision RU/s capacity (or use serverless/autoscale), and throttling (429 errors) happens when demand exceeds provisioned RU/s.
Should I use provisioned, autoscale, or serverless throughput?
Provisioned (manual) is cheapest for steady, predictable load. Autoscale bills for the peak RU/s used within a 10x range and suits variable load without throttling. Serverless bills per request (~$0.25 per million RU) and is cheapest for spiky, low-volume, or dev workloads. Match the model to your traffic shape.
Why is my Cosmos DB bill so high?
Usually over-provisioned RU/s, multiple regions with multi-region writes, or autoscale set to a high maximum. Provisioning 10,000 RU/s 'to be safe' when you use 1,000 wastes ~$500/month. Multi-region write doubles or triples throughput cost. Right-sizing RU/s and limiting regions are the biggest levers.
How do I reduce Cosmos DB costs?
Right-size provisioned RU/s to real usage with headroom, use autoscale for variable load and serverless for dev, limit to the regions you actually need, set a sensible TTL to keep storage down, and design partition keys well so queries cost fewer RUs. Reserved capacity gives up to ~65% off committed throughput.
How does C3X estimate Cosmos DB cost?
C3X prices an azurerm_cosmosdb_account from its provisioned throughput and region configuration, so over-provisioned RU/s and multi-region multipliers show up as a concrete monthly number before deployment.
What to do next
The RU/s number and region count are set in your Terraform, which means you can catch over-provisioning before it ships. C3X prices an azurerm_cosmosdb_account from its provisioned throughput and regions, so a 10,000 RU/s default or an extra write region shows up as real dollars in review. The quickstart runs it on your stack in minutes.
Share this post
Try C3X on your own Terraform
Free and open source. No API key required. One command to install, one command to estimate.