Azure Cosmos DB Pricing
Understand the pricing for Azure Cosmos DB, a globally distributed, multi-model database service. Pricing is based on the throughput provisioned and storage consumed. Cosmos DB offers a pay-as-you-go model with predictable costs.
Key Pricing Components
- Request Units (RUs): The normalized measure of throughput. Provisioned RUs determine the amount of read and write operations your database can handle per second.
- Storage: The amount of data stored in your Cosmos DB account.
- Data Transfer: Costs associated with transferring data into and out of Azure regions.
Throughput Provisioning
You can provision throughput at the database level or the container (collection/table/graph) level. Container-level provisioning offers finer-grained control and can be more cost-effective for fluctuating workloads.
Manual Throughput vs. Autoscale Throughput
- Manual Throughput: You specify a fixed number of RUs. This is ideal for predictable, consistent workloads.
- Autoscale Throughput: Cosmos DB automatically scales your throughput up and down based on your workload, from a minimum of 100 RUs to a maximum of 10,000 RUs (or higher with custom requests). This is cost-effective for variable workloads, ensuring you only pay for what you use.
Pricing Tiers
Azure Cosmos DB offers different pricing tiers and options to suit various needs:
- Free Tier: Offers a limited amount of RUs and storage for free, ideal for development and testing.
- Standard Tier: Pay-as-you-go pricing for production workloads.
- Enterprise Agreement: Discounted rates for larger commitments.
Example Pricing Breakdown (Illustrative)
The following table provides an illustrative example of pricing. Actual prices may vary based on region and specific configuration.
| Component | Unit | Price (USD/Month - Example) | Notes |
|---|---|---|---|
| Throughput (Provisioned RUs) | RU/s | $0.000040 per RU/s | Based on 1,000 RUs provisioned for a month (approx. 730 hours) |
| Storage | GB | $0.28 per GB | For data stored beyond the free tier allowance. |
| Data Transfer (Outbound) | GB | $0.087 per GB | Within the same Azure region is typically free. |
| Autoscale Throughput (Max 400 RU/s) | RU/s | $0.000080 per RU/s | Autoscale is priced at twice the manual RU/s rate but scales automatically. |
Calculating Costs
To estimate your costs, consider:
- Estimate your average read and write operations per second.
- Determine the RU cost per operation. Each operation has an associated RU cost. You can find these in the Request Units documentation.
- Calculate total RUs required: (Average reads/sec * RU cost per read) + (Average writes/sec * RU cost per write).
- Choose between manual or autoscale throughput based on workload predictability.
- Estimate your data storage needs.
- Factor in data transfer costs if applicable.
Use the Azure Pricing Calculator for a more precise cost estimation tailored to your specific usage patterns and region.