Pricing model in Azure Cosmos DB
APPLIES TO: SQL API Cassandra API Gremlin API Table API Azure Cosmos DB API for MongoDB
The pricing model of Azure Cosmos DB simplifies the cost management and planning. With Azure Cosmos DB, you pay for the operations you perform against the database and for the storage consumed by your data.
Database operations: The way you get charged for your database operations depends on the type of Azure Cosmos account you're using.
Provisioned Throughput: Provisioned throughput (also called reserved throughput) provides high performance at any scale. You specify the throughput that you need in Request Units per second (RU/s), and Azure Cosmos DB dedicates the resources required to provide the configured throughput. You can provision throughput on either a database or a container. Based on your workload needs, you can scale throughput up/down at any time or use autoscale (although there's a minimum throughput required on a database or a container to guarantee the SLAs). You're billed hourly for the maximum provisioned throughput for a given hour.
Because the provisioned throughput model dedicates resources to your container or database, you will be charged for the throughput you have provisioned even if you don't run any workloads.
Serverless: In serverless mode, you don't have to provision any throughput when creating resources in your Azure Cosmos account. At the end of your billing period, you get billed for the number of Request Units that has been consumed by your database operations.
Storage: You're billed a flat rate for the total amount of storage (in GBs) consumed by your data and indexes for a given hour. Storage is billed on a consumption basis, so you don't have to reserve any storage in advance. You're billed only for the storage you consume.
The pricing model in Azure Cosmos DB is consistent across all APIs. For more information, see the Azure Cosmos DB pricing page, Understanding your Azure Cosmos DB bill and How Azure Cosmos DB pricing model is cost-effective for customers.
Try Azure Cosmos DB for free
Azure Cosmos DB offers many options for developers to it for free. These options include:
Azure Cosmos DB free tier: Azure Cosmos DB free tier makes it easy to get started, develop and test your applications, or even run small production workloads for free. When free tier is enabled on an account, you'll get the first 1000 RU/s and 25 GB of storage in the account free, for the lifetime of the account. You can have up to one free tier account per Azure subscription and must opt-in when creating the account. To learn more, see how to create a free tier account article.
Azure trial subscription: Azure offers a trial subscription that gives you CNY 3500 in Azure credits for the first 30 days.
Azure Cosmos DB emulator: Azure Cosmos DB emulator provides a local environment that emulates the Azure Cosmos DB service for development purposes. Emulator is offered at no cost and with high fidelity to the cloud service. Using Azure Cosmos DB emulator, you can develop and test your applications locally, without creating an Azure subscription or incurring any costs. You can develop your applications by using the emulator locally before going into production. After you're satisfied with the functionality of the application against the emulator, you can switch to using the Azure Cosmos DB account in the cloud and significantly save on cost. For more information about dev/test, see using Azure Cosmos DB for development and testing.
You can learn more about optimizing the costs for your Azure Cosmos DB resources in the following articles:
Trying to do capacity planning for a migration to Azure Cosmos DB? You can use information about your existing database cluster for capacity planning.
- If all you know is the number of vcores and servers in your existing database cluster, read about estimating request units using vCores or vCPUs
- If you know typical request rates for your current database workload, read about estimating request units using Azure Cosmos DB capacity planner
Learn about Optimizing for development and testing
Learn more about Understanding your Azure Cosmos DB bill
Learn more about Optimizing throughput cost
Learn more about Optimizing storage cost
Learn more about Optimizing the cost of reads and writes
Learn more about Optimizing the cost of queries
Learn more about Optimizing the cost of multi-region Cosmos accounts
Learn about Azure Cosmos DB Emulator